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 → aglar pls help with model cog
aglar pls help with model cog
2001-04-29, 8:59 AM #1
hi there, aglar thanx for the cogs but id just like to know how to edit cog so that the model will change until the sector is re-entered. so you can go through sector, change the model, run around, then re-enter sector to change back to old model. is this possible?
2001-04-29, 9:07 AM #2
Sure is, but I don't have a copy of the cog I made you. Could you post it here?

------------------
Together we stand.
Divided we fall.
2001-04-30, 7:32 AM #3
here it is.....# MODELCHANGE.COG
# CHANGE A PLAYERS MODEL WHEN THEY ENTER A SECTOR
# 04/25/01
# AGLAR

FLAGS=0X240
SYMBOLS
THING PLAYER LOCAL
MODEL NEWMODEL
MODEL OLDMODEL LOCAL
SECTOR MODELSECTOR
MESSAGE STARTUP
MESSAGE ENTERED
MESSAGE EXITED
END

CODE
STARTUP:
PLAYER = GETLOCALPLAYTHING();
OLDMODEL = GETTHINGMODEL (PLAYER);
RETURN;
ENTERED:
SETTHINGMODEL(PLAYER, NEWMODEL);
RETURN;
EXITED:
SETTHINGMODEL(PLAYER, OLDMODEL);
RETURN;
END
2001-04-30, 9:00 AM #4
Funny, I don't remember typing it in all caps. Anyway, here you go:
Code:
# MODELCHANGE.COG
# CHANGE A PLAYERS MODEL WHEN THEY ENTER A SECTOR
# 04/25/01
# AGLAR
FLAGS=0X240
SYMBOLS
THING PLAYER LOCAL
MODEL NEWMODEL
MODEL OLDMODEL LOCAL
SECTOR MODELSECTOR
int secnum
MESSAGE STARTUP
MESSAGE ENTERED
END
CODE
STARTUP:
PLAYER = GETLOCALPLAYTHING();
OLDMODEL = GETTHINGMODEL (PLAYER);
RETURN;
ENTERED:
if (secnum = 0)
{
SETTHINGMODEL(PLAYER, NEWMODEL);
}
else
{
setthingmodel(player, oldmodel);
}
RETURN;
END

That should do it.

------------------
Together we stand.
Divided we fall.

[This message has been edited by Aglar (edited April 30, 2001).]
2001-05-02, 8:41 AM #5
thanx once again
2001-05-02, 8:58 AM #6
You are welcome, I assume it worked?

------------------
Together we stand.
Divided we fall.
2001-05-05, 5:02 AM #7
yip thanx alot aglar [http://forums.massassi.net/html/smile.gif]
if i have any other questions can i e-mail you or you wanna keep them here?
2001-05-05, 5:33 AM #8
You can email me, post them here, or post a message at the Cog Warehouse forums [http://forums.massassi.net/html/smile.gif]

------------------
Together we stand.
Divided we fall.

↑ Up to the top!