Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Quad, TipmyPip), 6,316 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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 | 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