UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

move script

broken avatar :(
Created 11 years ago
by jjbradman
0 Members and 1 Guest are viewing this topic.
1,936 views
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
942
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
well i made this script but it doesnt move a fuck >:C can someone help me? :(

Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;
#include maps\_zombiemode_utility;

main()
{
light_trig = getentarray("light_trig","targetname");
    array_thread(light_trig,::on_off_switch);
}

on_off_switch()
{
    helicopter = getentarray("helicopter","targetname");
    player = undefined;
    //self usetriggerrequirelookat();
    while(1)
    {
        light_trig sethintstring( "use_helicopter" );
        light_trig waittill( "trigger", player );
    helicopter movez(648, 8, 4, 6);
      wait 1;
    helicopter movey(1260, 8);
      wait 1;
    helicopter movey(1447, 7);  
  wait 1;
helicopter movex(1260, 2); 
  wait 1;
helicopter movex(1647, 10);
  wait 1;
helicopter movey(2699, 15);
  wait 1;
helicopter movex(1924, 5);
  wait 1;
helicopter movez(-648, 8, 2, 6);
   }
}
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
You can't move an array by just calling move on it. You need to iterate through every item within the array and move them.

Code Snippet
Plaintext
for(i=0;i<helicopters.size;i++)
{
helicopters[i] MoveX(1260,8);
}
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Please don't just use entity move functions to move the helicopter as its gonna look really weird. Use vehicle paths so the helicopter moves naturally. There's a tutorial on an airstrike that is on the UGX Wiki if you need reference.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Also did you checked DYNAMIC_PATH in entity settings?
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
942
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
:ooo thanks guys i think i'll try what saje said

 
Loading ...