Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, TipmyPip, Quad, AndrewAMD), 898 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Else never gets met #454579
09/10/15 20:56
09/10/15 20:56

M
Malice
Unregistered
Malice
Unregistered
M



else never met, object is a cube 4 units. Anyone tell me why?

Code:
if(vec_dist(my.x,vec_temp)>16)
{
c_move(my,nullvector,vector(vec_temp2.x*time_step,vec_temp2.y*time_step,vec_temp2.z*time_step),IGNORE_PASSABLE);
}
else
{
  vec_set(my.x,vec_temp);
  wait(4);
  ent_remove(me);
}


Last edited by Malice; 09/10/15 20:58.
Re: Else never gets met [Re: ] #454580
09/10/15 21:14
09/10/15 21:14
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Because the vector distance is always greater than 16? How do you initialize vec_temp?


Always learn from history, to be sure you make the same mistakes again...
Re: Else never gets met [Re: Uhrwerk] #454581
09/10/15 21:29
09/10/15 21:29

M
Malice
Unregistered
Malice
Unregistered
M



Uhrwerk thank for the reply.
Yes you were pointing the right issue. Vec_temp and vec_temp2 point to different things.
with vec_temp being the target point and vec_temp2 being a normalized speed for the difference between current place and target point.
Vec_temp2 ,work to get the object to the target, however vec_temp became changed so no longer held the target point.

Anyways thank for the reply.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1