Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,382 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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