Nexus Modding > Scripting

Scripting Issues

<< < (23/25) > >>

The Old Dragon:
As this is a scripted mission and you therefore know which object/s is/are to be damaged, could you not write a small routine that will select the various devices and then check their damage levels?

Then it could reset them where necessary and with the use of the 'Timer' command, you could re-run the routine as and when required (instead of using a 'tick').

Mularac:
The mission is like this, you start with all the devices disabled, so I put them with damage = 100, aka, completely destroyed, so the ship wouldn't try to fix it on it's own, and wrote a routine that would allow the player to cicle between all the devices that hasn't been fixed and choose which one they want to fix.
What I also wanted to do is write an other small routine (which I've already wrote, btw) that would "fake" a fixing progress bar for the duration of the fixing, and in doing that I encountered the problems I listed above.

Mularac:
Just checking, though I know the answer... is there a way to make an event kick in when a weapon hits a target? like the ion-scream bomb, for example.

Arparso:
Well, the FirstHit event kicks in if you've previously requested it for each ship using obj:tRequestFirstHitEvent() (and immediately request it again after each hit). You only get the victim and the attacker, though, not the specific weapon landing the hit. Can't think of anything else right now.

Mularac:
Yeah, I know that one. But what put it off is the thought of an other weapon beating the one I requested to the target ship... Meh, I think that a mere delay will do it...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version