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 → cant work
cant work
2001-10-25, 3:26 PM #1
Code:
# players.cog
#
# Jedi Knight COG script
#
# [JEPMAN]
#
#
# Showdown "Code Engine"
symbols

flags=0x240

model        knightdisplay=knightdisplay.3do                                  
model        magedisplay=magedisplay.3do                                      
model        knight=knight1.3do                                               
model        mage=mage1.3do                                                   

model        playermodel                        local                         
thing        player                             local                         
message      startup                                                          

end                                                                           
# .......................................................
code

startup:

Sleep(0.2); 

player=GetSourceRef();
playermodel = GetThingModel(player);

if(playermodel == knightdisplay)
{
SetThingModel(player, knight); 
ParseArg(player, "puppet=ky.pup");
}

else 

if(playermodel == magedisplay)
{
SetThingModel(player, mage); 
ParseArg(player, "puppet=ky.pup");
}

else 
if(playermodel == -1)
{
 Sleep(0.2); 
Print("Your model is invalid?");
}

else
{
 Sleep(0.2); 
print("Please choose a Showdown fighter");
}

print("All models checked for.");

Return;
end


------------------
-Jepster
If you don't like me, I got two words for you. Guess what they are cuz I'd get banned from here if I told you.

[This message has been edited by Jepster (edited October 25, 2001).]
2001-10-25, 4:18 PM #2
Been long since I posted here last time.

You can't get the player from "GetSourceRef()" in startup. Use "GetLocalPlayerThing()".

"playermodel" can't return "-1" though.


------------------
http://millennium.massassi.net/ - Millennium
2001-10-25, 8:18 PM #3
Hideki Your back !

Hmmmm can't it ?, I thought any varable not defined would return a -1 ?
2001-10-26, 5:05 AM #4
Will return 0.

Reason why DestroyThing(undefinedVar) will vanish the player (thing 0 in single player levels)from the game and crashes.

------------------
http://millennium.massassi.net/ - Millennium
2001-10-26, 7:12 AM #5
I could be wrong, but I don't think ParseArg() will sync in multiplayer. If you name all of the mesh names of ky.3do, you might be able to sync it by adding a new section to ky.pup, and using SetArmedMode().


------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz

↑ Up to the top!