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 → Another Cog
Another Cog
2004-10-05, 8:40 PM #1
Okay guys, I need a cog (I know, I'm helpless), that when you select an object with the 'use' button, it plays a sound, and some text , i want to be able to change the text to my liking in CogWriter, so I can do this with multiple objects, so it won't just play the same text message.. thanks!
2004-10-05, 11:30 PM #2
Code:
# Jedi Knight Cog Script
#
# monoxide.COG
#
# This cog plays a sound and some text upon activation of a thing.
# 6/10/04 [a_person]
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message    activated

sound      playsnd
thing      actthing
flex       sndvol

end

# ==============================================

code
activated:

PlaySoundLocal(playsnd, sndvol, 1, 0x1000);
print("Text goes here");

end


Do I need to make a check to check that its the particular thing being activated?
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-10-06, 3:25 PM #3
^^ not in this case, since the only thing in the cog that will send the activated message is the actthing.

However, if you had 2 actthings, and you wanted to print something different for each one, then you would need a check of some sort.
May the mass times acceleration be with you.
2004-10-06, 9:53 PM #4
Thanks for clearing that up for me.
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi

↑ Up to the top!