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.