Jump to content

Recommended Posts

Posted

NEW QUESTION ON LAST PAGE

So ive posted this over on the crymod forum too but I thought I would ask here as well.

Ive got a flowgraph setup where I want to add ammo to the VTOL for every boat destroyed. However there doesn't seem to be a way to add ammo to the VTOL without setting it, and there isn't a way to check the ammo so I can add the ammo count and 1 to be able to set my new ammo. Ie:

[attachment=0]Boat_flowgraph.png[/attachment]

(I left out the logic:any on this but I have since added it)

So is there any way of counting a global variable across all flowgraphs? and is there a way of detecting when the VTOL fires a rocket, because if there is I can set a global entity to be the start count for the ammo, minus 1 for every rocket fired, and can therefore know what to add 1 to when I destroy a boat. Then set that number to be my ammo count.

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Not entirely sure, I don't have Crysis installed to check it out. There's a node called Sensor or PlayerSensor, I think it's under Actor or Entity. Anyway, it listens to some predefined actions. If you're lucky there's something like OnShoot. With that node you can also know if the player has entered/exited a vehicle, so that if you can track shooting, you can stop it when the player exits the VTOL. Hope this helps!

Posted

Even better, theres a "Input:key" node it returns pressed and released so I should be able count if the player presses the right mouse button or left, now i just need to figure out what that key is called :D

Even even better. Theres a weapon:weaponlistener, I think all it should need is the correct weapon name, which im not sure for the VTOL rockets, I tried sidewinder but that didn't seem to work.

Posted

You could look into the GameData.pak or Scripts.pak archives and locate where the weapons are defined to find their appropriate names. Might be worth just opening the Equipment Pack editor and seeing if there's something that fits in the list of available items too. Sorry I never had to give a real good look at how weapons are defined in CryEngine, I just used them. :derp:

  • 2 weeks later...
Posted

Yup, the .pak files are just zips, so you can open them like zips. I think it should be something like GameData.pak/Scripts/entities/items/XML/weapons You should have all the existing weapons in there. If you're lucky, you can use the name of the VTOL weapon to listen to it.

Posted

its the sidewinder as i suspected because theres a sidewinder_ascmod weapon too, which is used on accension. I tried this in my flowgraph before but ill give it another go.

[attachment=0]vtolflowgraph.png[/attachment]

Thats what it looks like, the only other thing I think I can do to fix this is somehow link to the VTOLs weapon id, but i dunno how to do that :/

Posted

So the weaponlistener didnt work, i assume thats because it only listens to a weapon that can be placed in the world, ie not vechicle weapons.

So i went with the input method using MOUSE2 and it works !!! However there is a delay on the rockets the VTOL fires, I need to know what that delay is so I can stop any mouse presses in that time from decreasing the counter. Any ideas where I can find the delay on the sidewinder missles?

Posted

Ok, I don't know for sure, but there seems to be delays in the ammo xml for A2AHomingMissile (in entities/items/ammo/vehicles/)

	









In particular:

....
But this should only affect the projectile that gets fired, not the delay before you actually fire. My guess is that in this case the projectile would spawn 0.1 seconds after firing, and probably only be visible after 0.15 seconds. Dunno for sure what these values do. There's also the auto-aim lock-time in the Sidewinder.xml file that I dunno exactly what it does. Do you have to keep aiming at the target for a while before you can shoot or something? If so it probably controls that delay (how long you have to keep pointing at target before shooting) Sorry it's been ages since I played Crysis.

If you want to be sure about this, my suggestion is to extract those xml files related to the sidewinder and place them outside the pak files but respecting the same paths (so it'd be in Crysis/Game/Scripts/Entities/etc.) That should force the game to use those files instead of the ones inside the pak files. Then tweak those values and see what they do exactly. (You'll have to restart the game/editor each time you change it)

Posted

I think that's just for the lock-on, but thanks for putting me on the right path. Ive put in a value of 3 seconds as that seems to be how long it is, not sure how that relates to anything in the xml though :/

For the edit. Ill try that at home.

In the xml for the sidewinder there is a thing called rate, which is set to 25. But im not sure what rate is or relates to. Maybe 25 per minute. Which would make it 2.4 second delay after each shot.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...