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
2 registered members (TipmyPip, 1 invisible), 18,789 guests, and 8 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
Dynamic scripting, please help me.... #208836
05/29/08 22:06
05/29/08 22:06
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
I have a script, is has 2 gun entities, but I want to declare the gun function content only once, and only initialize the information about speed, type etc. from the main.

No I have made a global gun entity, and in the main function, I call a function called gun_init().
In this function, I am changing the gun information depending on a variable called currentGun.

Changing positions of the entity works fine, but I want to change the gun itself too.

I tried:

gun.type = "handgun.mdl";

But this doesn't doe anything...

---------------------------------------

As a alternative, I declared both guns as different entities including position, type etc., and to make it dynamic, I also made a global gun entity:

ENTITY* theGun = NULL;

And tried to copy the gun used at the time to the entity.

(entity -> entity)
theGun = handgun; (In this case, handgun is a previously declared ENTITY, just like I have machinegun declared.

---------------------------------------

Hope you guys understand it...
Hope you can help.

Last edited by NL_3DGS_n00b; 05/29/08 22:07.

The best games are the games you create yourself.
Re: Dynamic scripting, please help me.... [Re: NL_3DGS_n00b] #208884
05/30/08 12:31
05/30/08 12:31
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Happy Birthday Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
ent_morph


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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