SolvedMoving Objectives

Posts 1–9 of 9 · Page 1 of 1
Moving Objectives
Hey guys,
im trying to make an objective (yellow dot on map) follow a player but i cant get it working... It stays where i spawn it ...

Code:
doTrackPlayer()
{
  self endon("disconnect");
  self endon("death");
                        
  self.tracker = spawn("script_model", self.origin);
  self.tracker doTrack();                             
}

doTrack()
{
	self endon ( "disconnect" ); 
	self endon ( "death" ); 

		curObjID = maps\mp\gametypes\_gameobjects::getNextObjID();	
		name = precacheShader("compass_waypoint_panic");	
		objective_add(curObjID, "invisible", (0,0,0));
		objective_position(curObjID, self.origin);
		objective_state(curObjID, "active");
		objective_team(curObjID, self.team);
		objective_icon(curObjID, name);
		self.objIdFriendly = curObjID;
		
		while(1)
		{
      objective_position(self.objIdFriendly, self.origin);
      wait 0.1;
    }
}
Because you just set the position and don't make it move.
uh ok o.ô and how to move it?
i thought settings its position is moving?
Quote Originally Posted by edub18 View Post
uh ok o.ô and how to move it?
i thought settings its position is moving?
Want to know what you did wrong?
Code:
doTrack()
{
	self endon ( "disconnect" ); 
	self endon ( "death" ); 

		curObjID = maps\mp\gametypes\_gameobjects::getNextObjID();	
		name = precacheShader("compass_waypoint_panic");	
		objective_add(curObjID, "invisible", (0,0,0));
		objective_position(curObjID, self.origin);
		objective_state(curObjID, "active");
		objective_team(curObjID, self.team);
		objective_icon(curObjID, name);
		self.objIdFriendly = curObjID;
		
		while(1)
		{
      objective_position(self.objIdFriendly, self.origin);
      wait 0.1;
    }
}
Do that you.
(I guess you have copied this one..)
Why do you quote my code? o.ô
Its what you gone use
Its fixed now.

Have fun.
(You did wrong. So just the 1 thread)
Thanks but it doesnt work ^.^
No yellow dot appears on the minimap

// EDIT: K i got it working. Thank you
No problem.
/solved
/closed

Jorndel, thank you for helping.
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?