PDA

View Full Version : A simple upgrade for my item-conjuring cog?


ORJ_JoS
03-03-2005, 06:34 PM
Hi all, it's been a while since I've been here. I'm in my last year finishing my studies in college so im really busy. Anyways, in the little time i have left I'm still working on my big temple level :D and also keeping JK alive with my clan ORJ.

I need a small 'upgrade' for this cog:



# 05/2004, 08/2004 gbk
Symbols
Message Activated
Surface Toucheee
Thing Touchee
Thing Ghost
Template Item
End
Code
Activated:
Creatething(Item, Ghost);
Stop;
End



This cog that gbk made for me 'conjures' an item upon activating a thing or a surface.
Is it possible to build in a 'delay' that makes sure you cannot activate the switch again for about a second or two? Just to prevent spawning a lot of items in very little time, by constantly tapping activate.

I am very bad at understanding cog, so I'd be intensely happy if someone would kindly implement it for me. I know this nut shouldn't be too hard to crack for you old and wise wizards of cog ;)

Still dedicated to the best game ever,

ORJ_JoS

darthslaw
03-03-2005, 07:28 PM
Still dedicated to the best game ever
Glad to hear it! :D
As for your upgrade, copy the cog below (I like 'neat' cogs so I did some indenting and such)
# 05/2004, 08/2004 gbk
Symbols

Message Activated
Surface Toucheee
Thing Touchee
Thing Ghost
Template Item
int wait=0 local
flex delay=3.0

End
Code

Activated:
if(wait) return;
wait = 1;
Creatething(Item, Ghost);
Sleep(delay);
wait = 0;
Stop;
End
If I screwed up I need to be beaten severely.

ORJ_JoS
03-03-2005, 08:26 PM
Aw, wicked, Slaw!

Thanks a ton, fast reaction... I'm gonna test this baby... :D

If it works out, I'll be submitting a second preview room to my temple. It's gonna be a simple thing again, but people asked me to build and release this simple room so they can start using it. The room will eventually be included as one of the many rooms in the temple...

ORJ_JoS
03-03-2005, 08:29 PM
P.S. Did I mention it's for multiplayer?

(Not knowing if this has any importance in this case)

darthslaw
03-03-2005, 09:38 PM
It'll still work for multiplayer. :)

CavEmaN
03-03-2005, 11:33 PM
It should or your money back guarentee.

G-Man
03-04-2005, 02:36 AM
JoS you here?
cool:)

ORJ_JoS
03-04-2005, 08:53 AM
Hey G-Man :)

Yeah, look at my member status: 'Senior Member', dude ;) lol

(Although 'With tons of garlic' would sound cooler, I know)

Thanks, Slaw :D

It's working!

I haven't tested it in multiplayer yet, but I'm taking you guys' words for it. I'm using it to spawn remotes this time. I take it it's automatically local?

The delay works, thanks for making it a variable so I can just put in any amount of time in the placed cogs window, that is awesome.

Credit to Slaw!

PS This level is going to be released this week. It's a very basic saber room, but still... it's a (small but) new JK level! :D

ORJ_JoS
03-04-2005, 08:59 AM
Oh G-Man, I recognize your signature now, from waaaaaay back! lol Weren't you using a different name before?

ORJ_Pyro
03-09-2005, 07:14 AM
Hey jos cant wait to play your level sounds cool cya