OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Ares1978 on 07 Sep 2004, 12:20:42

Title: Changing models
Post by: Ares1978 on 07 Sep 2004, 12:20:42
Is it possible to have a separate model for a destroyed object, and if so, how?
I mean, an undamaged bridge would have one model and when it is destroyed, it would switch into a "destroyed_bridge_model"?
Title: Re:Changing models
Post by: DBR_ONIX on 07 Sep 2004, 17:00:55
If you mean in an addon, yeah
Code: [Select]
_mybridge = bridgename
_newbridge = "bridgeDestroyedClass"

@(!alive _mybridge):GOTO "destroyed"
EXIT
#destroyed
_bridgepos = getpos _mybridge
deletevehicle _mybridge
newbridge = _newbridge camcreate _bridgepos
EXIT

That should be it..
The first 2 lines are the one you need to change ::
_mybridge = bridgename
_newbridge = "bridgeDestroyedClass"

The first one will be the bridge name (The  undrestoyed one),
the second is the class name of the destroyed bridge model..
Hope you get all this ;)
- Ben
Title: Re:Changing models
Post by: Ares1978 on 08 Sep 2004, 07:28:38
Thanks. I hope I got it as well :)