Ouchface
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > team killer!
 
Author
All times are GMT. The time now is 10:47. Post New Thread    Post A Reply
mustafa saed
I seriously stink


Posts: 170
Registered: 04-02


I have a map where a group of marines
attack a base, now how can i script
where say like if 5 marines die then
kill the player? can someone give me
an a script example? because i don't
know how to script something like that.

__________________
Doomworld= preschool

Old Post 02-11-03 16:05 #
mustafa saed is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


Give all the marines the same tid then do something like this:

code:
if(!thingcount(0, x)) DamageThing(400); else { delay(1); restart; }


This assumes that there are a total of five marines with tid x, the real formula would be if(thingcount(0, x) == (total_marines - 5))

That has to be either an enter or a void script as well, the difference being enter scripts are executed when the map starts and void scripts are started in the game via some event. If you're going to make it a void script make sure that you have the player execute it, as DamageThing() is applied to whoever executed the script.

Alternativly I believe you could do something like TakeInventory("Health", GetInventory("Health")) (not sure if I have that syntax right) which would kill the player 100% of the time regardless of who executed the script (for instance if the marines kill each other).

Old Post 02-11-03 19:23 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 10:47. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > team killer!

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory