PDA

View Full Version : Raising Xpawns from the dead...


HamSammich
03-09-2005, 12:34 AM
Had a question for any scripted actions gurus out there... I posted this in the Mods and Mutators, not sure if that's the right section or not... Here is what I'm working on...

Click here for the map. (http://www.djnitro.com/DemoPics/Movertest3.1.ut2)

I want this guy to just run back and forth and take damage normally... I got that, no sweat... Only problem is, once he's gone, that's it. Is there a way to make this guy automatically re-spawn on death?

My first thought was to take the scripted sequence route and do something like:

IF ImNotDeadYet = true then keep running around else, Spawn new player...

But I don't know how to put this in Unreal-ese..

Any ideas?

thanks,
-H4M-

Lord_Simeon
03-09-2005, 12:49 AM
I've done a load of scripting for xPawns, and it is a pain in the ass.
I'm not sure with your problem though, maybe instead of having him die, you could up the health to something ridiculous so no-one can shoot him.
I'm not sure where that property is though, maybe in "none", everything else seems to be in there.

Inferny
03-09-2005, 01:40 AM
He wants it to be able to die, he also wants a new one to be generated when it dies, sorta liek a bot would do, be a pain to code that though.

HamSammich
03-09-2005, 06:01 AM
He wants it to be able to die, he also wants a new one to be generated when it dies, sorta liek a bot would do, be a pain to code that though.


Exactly... If that is too much a PITA, which it looks like it may be, what about pushing a button to spawn a new bot?

Garoc
03-09-2005, 04:43 PM
press escape -add new bot- lol.

Inferny
03-10-2005, 02:39 AM
i think he means a button in the wold, liek a trigger rigged to spawn a xpawn.
[/translate]

Angel_Mapper
03-10-2005, 02:49 AM
Only thing I can think of is to leave the pawn out, and have an actor to spawn it. When it's triggered, it spawns the pawn and sets its AIScriptTag to the Tag of the AIScript, and also assigns the pawn to an internal variable (like MyPawn = ThePawn). That way it would keep you from spawning another one until the previous one had died.

JohnnySix
03-10-2005, 02:27 PM
What AM said, the original UT had a thingfactory/creaturefactory that would spawn pawns, the script doesn't exist in 2k4, but looking at the code for spawning the bulldog, it could easily be modified to spawn a bot/pawn of your choice.

HamSammich
03-11-2005, 01:26 AM
What AM said, the original UT had a thingfactory/creaturefactory that would spawn pawns, the script doesn't exist in 2k4, but looking at the code for spawning the bulldog, it could easily be modified to spawn a bot/pawn of your choice.

Anyone feel like tackling it?

-H4M-

Butters
03-11-2005, 09:00 AM
Ok.. here's a very basic implementation:

Map with Ham Pawn (http://www.zen44241.zen.co.uk/Misc/Movertest-HP.zip)

You can just copy the code into your map (Or better, compile and then import it so that bStatic is set the proper way). Dig? (http://wiki.beyondunreal.com/wiki/Embedding_Code)

Anyway, what do you want to use this for? Seems a bit dull to me :p
:hammer:

HamSammich
03-19-2005, 11:07 AM
Ok.. here's a very basic implementation:

Map with Ham Pawn (http://www.zen44241.zen.co.uk/Misc/Movertest-HP.zip)

Oh man... this is awesome.... thank you!

You can just copy the code into your map (Or better, compile and then import it so that bStatic is set the proper way). Dig? (http://wiki.beyondunreal.com/wiki/Embedding_Code)


Right now, no, But I'm going to read through that page and I'll probably be able to figure it out...

Anyway, what do you want to use this for? Seems a bit dull to me :p
:hammer:

I'll pm you... :)

-H4M-