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

I want to move a object using a sort of beginner easteregg

broken avatar :(
Created 10 years ago
by TwoDeeSee
0 Members and 1 Guest are viewing this topic.
1,466 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 February 2015
Last active: 9 years ago
Posts
18
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
TwoDeeSee's Groups
TwoDeeSee's Contact & Social Links
So I'm still kind of fresh with GSC but I have gotten better at understanding! however I ran into a issue...

so I first tried to disable the trigger of a perk machine until a flag is set but the game freezes whenever the flag is set and as a coder I know freezing is never a good thing... it means there is error!
my original idea was to have the perk machine float through a wall and stop so it could be used, but I can't figure out how to do this... I tried using move() but it doesn't work, it sits there.

(also just a HU at line 37+ if you are wondering why I put self instead of a declaration for the object I just figured it would be the same thing, plus with the declaration it still didn't work so smh :-\)   :)

so heres the entire script :

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

config()
{
level.deposit_hint = "Press &&1 to open the door"; // Cost area will be added after by the script
level.deposit_electric_hint = "You need to turn the power on";

}
trick()
{
      IPrintLnBold( "How did you know?!?" );
 
 
}

init()
{
   things = GetEntArray( "things","targetname" );//triggers or ents to shoot
   rockets = GetEntArray("vista_rocket","targetname");
   level.things = things.size;
   array_thread( things,::ShootThings );
   array_thread(rockets,::kino_init);
}

ShootThings(){
   self waittill("damage"); //for ents that are shootable
   level.things--;
   if(level.things<=0){
      //reward here, spawn pap, or weapons, or whatever
      self thread trick();
   }
}
   
   kino_init(){
  for(i = 0; i < self.size; i ++)
  {
 
  s = getstruct(self[i].target, "targetname");
 
  self[i] MoveTo(s.origin ,4);
  self[i] RotateTo( (0,0,0), 4);
 
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 2;
  IPrintLnBold( "Object moved!" );
  wait 4;
  IPrintLnBold( "Object moved!" );
   }
   wait 2;
  IPrintLnBold( "Error" );
   wait 2;
  IPrintLnBold( "Error" );
   wait 2;
  IPrintLnBold( "Error" );
   wait 2;
  IPrintLnBold( "Error" );
   wait 2;
  IPrintLnBold( "Error" );
   wait 2;
  IPrintLnBold( "Error" );
   wait 2;
  IPrintLnBold( "Error" );
}

Thanks again!  :D

Double Post Merge: August 26, 2016, 05:10:03 am
I hope this isn't bugging anyone I just don't know what is going on and why its not working...
if anyone could point me in the right direction I'd be forever greatful! Seriously!  :nyan:  :rainbow:
Last Edit: August 26, 2016, 05:10:03 am by TwoDeeSee

 
Loading ...