AgentJonathan 0 Posted October 12, 2007 Is there a way to add a category under Commands, Weapons, Ammo, Vehicle Ammo, and Equipment? Because I wanted to create a way to conveniently have unoficcial weapon and ammo names in the editor. Thx... I also would like to know how to make an object (Which in this case is a spotlight) Change direction, looking left and right with a slow, smooth resolution? Thx alot peoples... Share this post Link to post Share on other sites
Pulverizer 1 Posted October 12, 2007 Quote[/b] ]Is there a way to add a category under Commands, Weapons, Ammo, Vehicle Ammo, and Equipment? Because I wanted to create a way to conveniently have unoficcial weapon and ammo names in the editor. Thx... They're probably stored in a text file. Don't know for sure though but it wouldn't make sense to have them hard-coded. Quote[/b] ]I also would like to know how to make an object (Which in this case is a spotlight) Change direction, looking left and right with a slow, smooth resolution? Elementary, my dear Jonathan: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; scan.sqs ; objectname exec "scan.sqs" ;---- PARAMETERS ----------- ; sector width in degrees: _sw = 45 ; perioid in seconds: _pt = 15 ;---- END OF PARAMS --------- _u=_this;_cd=getdir _u;_sw=_sw/2 #s _u setdir(_cd+_sw*sin(_time%_pt/_pt*360)) ~0.02 ?getdammage _u<1:goto "s" exit Share this post Link to post Share on other sites
AgentJonathan 0 Posted October 12, 2007 Thanks alot, Pulverizer. That spotlight thing was necessary. Thanks. Share this post Link to post Share on other sites
AgentJonathan 0 Posted October 12, 2007 Oh, but in addition, I have tried to enter what I want in the script editor and it umm... didn't operate. If anyone has help regarding the scripting inconvinience, please assist me. Thx... Share this post Link to post Share on other sites
AgentJonathan 0 Posted October 14, 2007 Actually, I'm having problems with this script. Maybe the run code I entered was wrong, but it had no '_this Select's in it... If anyone can help with this, feel free-- and thanks. Share this post Link to post Share on other sites
ProfTournesol 956 Posted October 15, 2007 As i'm a nice guy i did try this script for you, and it does work very well... Just copy and paste it in a script (or text...) editor, name it scan.sqs and put it in your mission folder. Put an object on the map, and type in its init line : this exec "scan.sqs" Quote[/b] ]Actually, I'm having problems with this script. Maybe the run code I entered was wrong, but it had no '_this Select's in it... No problemo here, cause : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_u = _this is enough as the script does only need one argument to work...if it would need more than one argument to work, then you'll have to type : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[argument1, argument2] exec "scan.sqs" And in the script you'll find the following lines : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_argument1 = _this select 0 _argument2 = _this select 1 In brief, here "_this" only contains one argument, but it may contain more than one in other scripts, which you'll have to select one by one (_this select 0, _this select 1, _this select 2 etc...). An example :"group player" is in fact the array of all the units in the group of the player. "group player select 0" is the first alive unit in the group of the player, which is most of the time the leader. "group player select 1" is the second alive unit in the group of the player, etc... Voila ! Â Share this post Link to post Share on other sites