Spawning a unit as empty

Moderators: GSH, VSMIT, Red Devil, Commando

Post Reply
User avatar
Vadam
Thunderbolt
Posts: 104
Joined: Sat May 18, 2013 3:02 pm

Spawning a unit as empty

Post by Vadam »

I'm in the process of making a pack weapon for pilots that spawns a small unit for the pilot to escape in. I can get the unit to spawn, but I don't know how to make it spawn empty. I've tried fooling around with addPilot and needPilot in the unit odf but those didn't seem to work. I'm sure the answer is obvious and I'm missing something, so if anybody could tell me, that'd be great.
Starfleet 0.8 - Almost done!
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Spawning a unit as empty

Post by General BlackDragon »

try not setting an aiName for it? That might work. Try aiName = NULL and aiName2 = NULL, though doing that might be a bit...dangerous.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Spawning a unit as empty

Post by bigbadbogie »

classLabel = "objectspawn" class objects spawn empty units. Perhaps you could create a weapon that drops an 'objectspawn' (with lifeSpan = 0.1 so it only creates one empty unit and dies/is removed). ObjectSpawns create an endless stream of units otherwise, so it would be prudent to add lifeSpan = 0.1.

Examples of objectSpawn class objects can be found in data.pak under -> Weapons -> sp_powerups.

LifeSpan = 0.1 would go under [GameObjectClass] (less than lifeSpan = 0.02 wont function for some reason, so don't do that)
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Vadam
Thunderbolt
Posts: 104
Joined: Sat May 18, 2013 3:02 pm

Re: Spawning a unit as empty

Post by Vadam »

Both methods worked. I'll stick with BBB's method since it spawns it on the ground, as opposed to directly on the pilot. Since that can be used to just infinitely self-destruct and keep going up when the pilot is in the air.
Starfleet 0.8 - Almost done!
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Spawning a unit as empty

Post by General BlackDragon »

Yea BBB's method is better :)
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Spawning a unit as empty

Post by bigbadbogie »

Not having an AI process may cause the game to crash when an AI pilot enters it too.
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Spawning a unit as empty

Post by Nielk1 »

I know in 1.2 there was a thing about having no AIProcess making the pilots instantly disappear when they got in. Now, in 1.3, it might prevent them from getting in, unsure. There should be flags to prevent AI pilots from entering the unit if you wish.

BBB's method is indeed by far the best.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Spawning a unit as empty

Post by MrTwosheds »

:lol: Is it a space hopper? :lol:
Image
The Silence continues. The War Of Lies has no end.
Post Reply