Jump to content
Sign in to follow this  
drunken officer

running a script by a wepon / cant find weapon in editor

Recommended Posts

I create a speedhandgun. My script to check out speed of an object is running. all tests are good. but i tested it all the time by an "thing", but the laserhandgun is a "pistole"Now i was trying to run the *.sqf by my laserhandgun. Nothing! The script wont start.

class cfgWeapons;
class default {};
class pistolecore;
class m9 : pistolecore {};
class Laserhandgun : m9
{
display = ...
....
class EventHandlers
         {init = "_this execVM ""\...\blabla.sqf""; " };
};

I was woundering and use a very simple script

_laser = _this select 0;
while {true} do {player sideChat "script is running";sleep 1;};

Can i call a external script, when the object is a gun?

2nd question.

I cant found the gun in the editor. I've to use this code inside the init line: this addweapon "Laserhandgun"; Then the laserhandgun is inside the inventory.

And nice to know:

Can some tell my a code to get the speed, when the player put the trigger of the laserpistole? My script is running the whole time and check out the relative angel to the pistol and the distance.

Edited by Drunken Officer

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×