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 with the rand command thingy
Help with the rand command thingy
2001-03-03, 7:03 AM #1
okay i can do simple cogging and some advanced but i never realy understood how to use rand(). I have this cog wich plays a taunt it is a very simple script and works fine just i was wondering how to make it randomly choose a key from more than one key. Would this use rand() or is there another way to do it?
here is my cde:
Code:
# NEWP Cog Script
#
# TAUNT.COG
#
# Very simple taunt cog.
#
# [Han5678]


symbols

thing        player                                                           
vector       randVec                            local                         
keyframe     key=taunt.key                     local                         

message      activated                                                        
end                                                                           

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

code

activated:
   player = GetSourceRef();
{
   PlayKey(GetLocalPlayerThing(), key, 2, 32);
	}

   Return;

end
roses are red, violets are blue, I am schizophrenic, and I am too!

↑ Up to the top!