Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/05/26 02:58
zorro with ccxt?
by opm. 03/03/26 03:17
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, VoroneTZ), 5,471 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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