Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → HELP: Simple +spark generator cog.
HELP: Simple +spark generator cog.
2006-06-30, 12:43 AM #1
I have been trying to teach myself COG. Many things, I do not know. I've been trying to write a cog that will generate +spark from ghost locations after a specific thing has been shot or slashed.

symbols

message damaged
message pulserate
message timer

thing damagedthing linkid=-1
thing ghost0 linkid=-1
thing ghost1 linkid=-1
thing ghost2 linkid=-1
thing ghost3 linkid=-1

(...some stuff about my wav0, +sparks, etc...)

end

#---

damaged:

What shall I do here?
2006-06-30, 4:54 PM #2
Remember to shove a 'timer' in, if you want the speaks to repeat. I think I have the general jist.

#--

timer:

SetTimer(minimumDelay + Rand() * (maximumDelay - minimumDelay));

Return;

#--

damaged:

CreateThing(sparkTemplate, damagedthing);
CreateThing(sparkTemplate, ghost0);
CreateThing(sparkTemplate, ghost1);
CreateThing(sparkTemplate, ghost2);
CreateThing(sparkTemplate, ghost3);

#--

Something like that? If you want it to be after so much damage, you need to give the thing health ... I suggest looking up xtank3 cog.

Also, I suck at cog, so if it doesn't work I apologise :)
Magrucko Daines and the Crypt of Crola (2007)
Magrucko Daines and the Dark Youth (2010)
Magrucko Daines and the Vertical City (2016)

↑ Up to the top!