PDA

View Full Version : Triggering an ICARUS event with an NPC's health?


AKPiggott
02-23-2003, 07:53 AM
There's an instance in my level where something needs to be triggered when an NPC's health goes below a certain level. Can anyone help me with this?

MilesTeg
02-23-2003, 08:55 AM
yavin_final/desann_hurt.txt:

if ( $get( FLOAT, "SET_HEALTH") < 200$ )
{
}

Emon
02-23-2003, 04:50 PM
Just put that in something that loops like .05 seconds.

lassev
02-24-2003, 10:37 AM
I was yesterday experimenting with set_attackscript. I had by mistake named the script wrong, and thus it did not launch in the game, but the stromtrooper did try to launch this script every time I fired my gun (the informative red error message launched all right on my screen). So, this is also one way to concider launching a script like the one MilesTeg posted. That is, if the correctly named script would also launch every time the player attacks, and not only once. That I do not know, as in my case once is enough.

EDIT:
Thanks to the rather unspecific Raven descriptions I misinterpreted the Attackscript. Indeed, it fires every time the NPC launches his own weapon. That works for me, but not in the thread case.

AKPiggott
02-24-2003, 01:32 PM
I found an easier way. I basically set the health of the NPC in npcs.cfg, set the NPC to undying and gave him a deathscript which triggers the even, turns the undying off and donates the amount of health I want to the NPC.

Emon
02-25-2003, 12:02 AM
That works. Also, check out this command:

SET_FLEESCRIPT script file path Script to run when entity is hit and has less than

1/3 of it’s initial health


And AK, a while back you were trying to make it so the player could only use the lightsaber. If you're still doing that, check out this command:

SET_LOCK_PLAYER_WEAPONS “true/false” Makes it so player cannot switch weapons

AKPiggott
02-25-2003, 05:52 AM
Yeah... you suggested that one before Emon (or someone did).

It also locks Force Powers and makes the player say "I better not" whenever you try and Force Jump.

Kengo
02-25-2003, 10:10 PM
Originally posted by AKPiggott
It also locks Force Powers and makes the player say "I better not" whenever you try and Force Jump.

I prefer the generic, and deeply unrealistic 'boing' sound from 2d platformers. Imagine if Mario said "I-a beeetta-a nota" everytime he jumped? Just imagine how bad that would be.

Leslie Judge
02-26-2003, 11:41 AM
Originally posted by Emon
That works. Also, check out this command:

SET_FLEESCRIPT
And check out SET_PAINSCRIPT too. :)

AKPiggott
02-26-2003, 03:37 PM
Originally posted by Kengo
I prefer the generic, and deeply unrealistic 'boing' sound from 2d platformers. Imagine if Mario said "I-a beeetta-a nota" everytime he jumped? Just imagine how bad that would be.

Yeah... those old Nintendo systems had really primitive soundchips... imagine how crackly and uncomprehendable it'll sound.

Kengo
02-26-2003, 06:56 PM
Originally posted by AKPiggott
Yeah... those old Nintendo systems had really primitive soundchips... imagine how crackly and uncomprehendable it'll sound.

You poking fun at the crackly sound quality of the voice acting in my maps??? :mad:

The way you phrased it -"it'll sound", makes it sound like that's what you're gonna do. I say go with it man, everyone will find it funny, the first few times at least. Is it just me or is this starting to sound like a really good idea? Replace all the sounds with a mix of Mace Windue and Mario....when you do a wall walk - "waheeeeeeey", when you finish the level - "it's-a meeeea - Macea Winduuuuuuuuuuu-a!", when you do a super high jump "wooooooooohoooooooooo-a!".

I've pushed this idea as much as I think I should. Possilby more.

Emon
02-26-2003, 10:50 PM
Originally posted by Kengo
You poking fun at the crackly sound quality of the voice acting in my maps???

I don't think he was, but, uh, you're voice acting in your maps is pretty horrible.

AKPiggott
02-27-2003, 06:42 AM
It's still completely incomparable to the dreadful voice acting in Dark Emperor 2. The voices in that were absolutely appauling, so much so that the level deserves classic status from it.

Kengo
02-27-2003, 10:33 AM
Originally posted by Emon
I don't think he was, but, uh, you're voice acting in your maps is pretty horrible.

I know man, I'm just kidding :), though I think it's more the sound quality than the voice actors themselves, many of whom I think are good.

Kengo
02-27-2003, 10:35 AM
Originally posted by AKPiggott
It's still completely incomparable to the dreadful voice acting in Dark Emperor 2. The voices in that were absolutely appauling, so much so that the level deserves classic status from it.

So bad voice acting is in some ways a good thing? You gonna go with my Mario idea then?

AKPiggott
02-27-2003, 10:56 AM
Sorry, but there can only be one Dark Emperor 2.