Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,280 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
trace hit a block or an entity? #65944
03/09/06 15:38
03/09/06 15:38
Joined: Feb 2003
Posts: 211
Unna
F
Freddy_dup1 Offline OP
Member
Freddy_dup1  Offline OP
Member
F

Joined: Feb 2003
Posts: 211
Unna
Hello,

if I use trace how can I get the info whether I hit a block or
an entity?

Something like:
Code:
if(you==entity){...}
if(you==block){...}



This doesn't work:
Code:
if(event_type==event_block){ ...}


Nothing happens...

Re: trace hit a block or an entity? [Re: Freddy_dup1] #65945
03/10/06 17:19
03/10/06 17:19
Joined: Jan 2006
Posts: 45
Yarcanox Offline
Newbie
Yarcanox  Offline
Newbie

Joined: Jan 2006
Posts: 45
Look at this:
Code:

trace_mode = ignore_passable + ignore_me;
you = null;
trace(my.x,vector(my.x + 1000,my.y,my.z)); //Trace forward
If (result > 0)&&(you == null) {//If that's true you hit the level/ground
}
If (result > 0)&&(you != null) {//If that's true you hit an entity



EDIT: Sorry, at first I answered in German

Last edited by BlueDeath; 03/10/06 17:21.

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