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 → Simple question
Simple question
2004-08-09, 2:37 PM #1
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.

Code:
# 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).]
ORJ / My Level: ORJ Temple Tournament I
2004-08-09, 10:50 PM #2
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]

Code:
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)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-08-10, 3:07 AM #3
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=
ORJ / My Level: ORJ Temple Tournament I
2004-08-10, 4:05 AM #4
Code:
# 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.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-08-10, 4:29 AM #5
Yes, but can you do it in fewer characters? [http://forums.massassi.net/html/rolleyes.gif]
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-08-10, 1:12 PM #6
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=
ORJ / My Level: ORJ Temple Tournament I
2004-08-10, 1:24 PM #7
Never mind

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

[This message has been edited by Ace1 (edited August 10, 2004).]
I am _ Ace_1 _ , and I approve this message.
2004-08-10, 1:32 PM #8
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)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-08-29, 5:03 PM #9
(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=
ORJ / My Level: ORJ Temple Tournament I
2004-08-30, 11:56 PM #10
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)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||

↑ Up to the top!