Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/20/26 07:00
Black Book, 4th edition
by jcl. 03/17/26 09:28
Trying to get started...
by Lukudo. 03/16/26 09:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 4,789 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 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 | 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