Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, 7th_zorro, Ayumi), 926 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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