View Full Version : Need simple cog
sskakarot51
03-29-2003, 12:05 PM
ive asked this before but no one really replied. i need a cog for when a surface is hit by a weapon and damaged explosions are created at up to 20 ghost positions.
------------------
DogSRoOL
03-29-2003, 02:23 PM
# SurfExplode.cog
# by DogSRoOL
# spuds_61520@yahoo.com
# ASuperCheese@AOL.com
# Use "delay" to block the damaged message for a certain period of time after initially being damaged"
# (i.e. damage surface, can't damage for "delay" seconds, then damageable again).
# Use "RepeatFactor" to specify whether explosions should only happen once (0) or every time surface is
# damaged (any # other than 0)
symbols
Message Damaged
Message Timer
Surface Surf0 mask=0x408
Thing Ghost00
Thing Ghost01
Thing Ghost02
Thing Ghost03
Thing Ghost04
Thing Ghost05
Thing Ghost06
Thing Ghost07
Thing Ghost08
Thing Ghost09
Thing Ghost10
Thing Ghost11
Thing Ghost12
Thing Ghost13
Thing Ghost14
Thing Ghost15
Thing Ghost16
Thing Ghost17
Thing Ghost18
Thing Ghost19
template exp=+03_exp
int i local
int repeatfactor=0
int blocked=0 local
flex delay=5.0
end
code
Damaged:
if(blocked >= 1) return;
if(repeatfactor==0) blocked=2;
else { blocked=1; if(delay > 0) SetTimer(delay); }
for(i=0; i<=19; i=i+1)
{
if(Ghost00[i] > -1) CreateThing(exp, ghost00[i]);
}
Return;
Timer:
Blocked=0;
Return;
end
enjoy http://forums.massassi.net/html/wink.gif
(BTW, I actually decided to test this cog, so I'm sure it works.)
------------------
May the forks be with you.
[This message has been edited by DogSRoOL (edited March 29, 2003).]
sskakarot51
03-29-2003, 05:52 PM
omg thank you!!!!!!! thank you thank you!
------------------
DogSRoOL
03-29-2003, 10:13 PM
http://forums.massassi.net/html/cool.gif
------------------
May the forks be with you.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.