Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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
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 | 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