Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 5,207 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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