PDA

View Full Version : Simple question


ORJ_JoS
08-09-2004, 05:37 PM
I have this cog that 'conjures' an item upon activating a thing. It works, but I'd like it to work upon 'activation' of a surface too. I tried adding a symbol for a surface but it proved to be not THAT easy, lol. Can anyone tell me how to do this correctly?

Here's GBK's original.


# Simple JK Cog script to 'conjure' an item upon activation of a thing (3do).
#
# 05/2004 gbk
Symbols
Message Activated
Thing Touchee
Thing Ghost
Template Item
End
Code
Activated:
Creatething(Item, Ghost);
Stop;
End


------------------
ORJ_JoS
=Council Member=
+Order of Reborn Jedi+

http://www.rebornjedi.cjb.net

Long live JK! =Best Game Ever=

[This message has been edited by ORJ_JoS (edited August 09, 2004).]

lucky_jackpot
08-10-2004, 01:50 AM
Just a quicky I drummed up - you can tell by the lack of comments in the code (as in "none-existant" http://forums.massassi.net/html/wink.gif) - sorry but I'm at work at the mo, so it's the best I could do... http://forums.massassi.net/html/redface.gif


symbols

message activated
template tplItem
surface surf0 linkid=1
thing object linkid=1
thing spawnPos

end

code

activated:
if (GetSenderID() == 1) {
CreateThing (tplItem, spawnPos);
}
return;

end


It should work although I haven't had chance to test it (though I dare say you'll have chance to before I get home from work http://forums.massassi.net/html/wink.gif)

Hope this helps http://forums.massassi.net/html/biggrin.gif

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX
"jackpot is an evil evil man... so evil, in fact, that he's awesome." - Seb

"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

ORJ_JoS
08-10-2004, 06:07 AM
Alright, thanks a lot! Is it MultiPlayer proof? I can't test it on 2 comps at the moment, only 1 comp working.

------------------
ORJ_JoS
=Council Member=
+Order of Reborn Jedi+

http://www.rebornjedi.cjb.net

Long live JK! =Best Game Ever=

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

...that should do the trick.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:w (http://shauri.hopto.org)q (http://www.massassi.net/levels/files/2533.shtml)! (http://shauri.hopto.org/polls.pl)

Lord_Grismath
08-10-2004, 07:29 AM
Yes, but can you do it in fewer characters? http://forums.massassi.net/html/rolleyes.gif

ORJ_JoS
08-10-2004, 04:12 PM
Thanks, GBK. But I already tried that myself and it just didn't work... Think I'll try it again, lol. Maybe I just mistyped the surface number or something.

------------------
ORJ_JoS
=Council Member=
+Order of Reborn Jedi+

http://www.rebornjedi.cjb.net

Long live JK! =Best Game Ever=

Ace1
08-10-2004, 04:24 PM
Never mind

------------------
I am __Ace_1__ , and I

[This message has been edited by Ace1 (edited August 10, 2004).]

lucky_jackpot
08-10-2004, 04:32 PM
Sorry Ace, but it looks like GBK's notched up another "victim" to his list of people that have fallen for that trick http://forums.massassi.net/html/wink.gif - "stop" is an actual JK keyword (used in some of the original JK cogs actually) that has exactly the same purpose as "return" - it's just GBK wants to be different http://forums.massassi.net/html/tongue.gif http://forums.massassi.net/html/biggrin.gif. I don't know why the JK team decided to have two keywords for the same thing, but then again they chose "flex" over "float" in many of the cogs too... *shrugs*

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX
"jackpot is an evil evil man... so evil, in fact, that he's awesome." - Seb

"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

ORJ_JoS
08-29-2004, 08:03 PM
(almost forgot to post, but...)

Yep, it works! http://forums.massassi.net/html/biggrin.gif

Thanks, people!

------------------
ORJ_JoS
=Council Member=
+Order of Reborn Jedi+

http://www.rebornjedi.cjb.net

Long live JK! =Best Game Ever=

lucky_jackpot
08-31-2004, 02:56 AM
Not a problem - that's what we're here for http://forums.massassi.net/html/smile.gif. Glad we could all help and share our "valuable" wisdom http://forums.massassi.net/html/wink.gif http://forums.massassi.net/html/biggrin.gif

-Jackpot

------------------
"lucky_jackpot is the smily god..." - gothicX
"jackpot is an evil evil man... so evil, in fact, that he's awesome." - Seb

"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)