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 → im lookin for a cog to change model
im lookin for a cog to change model
2001-04-25, 10:17 AM #1
i need a cog that will change the player model when a sector is entered, the new player must be selectable in the placed cogs window if anyone can help, please
2001-04-25, 10:49 AM #2
Here you go:
Code:
# modelchange.cog
# Changes a player's model when they enter a sector
# 04/25/01
# Aglar
flags=0x204
symbols
thing player local
model newmodel
model oldmodel local
sector modelsector
message startup
message entered
message exited
end
code
startup:
player = GetLocalPlayerThing();
oldmodel = GetThingModel(player);
Return;
entered:
SetThingModel(player, newmodel);
Return;
Exited:
SetThingModel(player, oldmodel);
Return;
end

That cog will change the player's model back to the old model when they exit the sector. If you wanted the model to stay as the new one, then use this instead:
Code:
# modelchange.cog
# Changes a player's model when they enter a sector
# 04/25/01
# Aglar
flags=0x204
symbols
thing player local
model newmodel
sector modelsector
message startup
message entered
end
code
startup:
player = GetLocalPlayerThing();
Return;
entered:
SetThingModel(player, newmodel);
Return;
End

Hope it helps [http://forums.massassi.net/html/biggrin.gif]

------------------
Together we stand.
Divided we fall.
2001-04-25, 12:47 PM #3
Aglar, was that supposed to be 'flags=0x240'? Or is this some new flag you've discovered.

Raynar

------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2001-04-25, 2:13 PM #4
Yeah, you're right, it's a typo [http://forums.massassi.net/html/smile.gif]
I wasn't sure if it was even required, figured better safe than sorry.

------------------
Together we stand.
Divided we fall.
2001-04-26, 6:32 AM #5
you could do all kinds of cool things with that cog...
Like if you could only find a fat kyle 3do somewhere...
And shepards we shall be, for thee my lord for thee, power hath descended forth from thy hand, that our feet may swiftly carry out thy command, and we shall flow a river forth to thee, in teeming with souls shall it ever be, in nomine patri, et fili, et spiritus sancti

↑ Up to the top!