Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Ayumi, NewbieZorro, TipmyPip), 13,888 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
swapping a mdl during the game? #81577
07/15/06 10:14
07/15/06 10:14
Joined: Feb 2006
Posts: 124
Dallas,TX
Delirium Offline OP
Member
Delirium  Offline OP
Member

Joined: Feb 2006
Posts: 124
Dallas,TX
For an effect, I'd like to have a model, say a soldier, change into a different model during the game. As if the ordinary soldier gets powered up and becomes more formidable. Using two mdls, one a normal looking soldier and the other a bulkier montrous looking mdl. I'm sure part of it would be remove me, to take away the first model, and then, entity create.

What function would you write to swap mdls? I know this isn't really complete code below, but it shouldn't be much more complicated than this.

FUNCTION transform_model()
{
ME = soldier; // identifying name of the entity here
// call a function to get the vector of the soldier here
ent_remove(me); // remove the original soldier
ent_create (soldier,<hulk.mdl>,vector,patrol); // bulkier mdl to substitute
}

Would that work? If it does then writing a similar function to restore the
soldier after his powerup wears off would be the same, but swapping the mdls
again.

Thanks

Re: swapping a mdl during the game? [Re: Delirium] #81578
07/15/06 10:16
07/15/06 10:16
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
Code:

ent_morph(me,"other.mdl");



This changes the mesh of the entity.


Your friendly mod is at your service.
Re: swapping a mdl during the game? [Re: MichaelGale] #81579
07/15/06 12:48
07/15/06 12:48
Joined: Feb 2006
Posts: 124
Dallas,TX
Delirium Offline OP
Member
Delirium  Offline OP
Member

Joined: Feb 2006
Posts: 124
Dallas,TX
Thank you, that's even simpler than I thought.

Anton


Moderated by  HeelX, rvL_eXile 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1