Gamestudio Links
Zorro Links
Newest Posts
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
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (EternallyCurious, Quad, vicknick), 700 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
c_trace and events or not.. #239047
12/02/08 06:11
12/02/08 06:11
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
HiHo,


I'm now on learning about c_trace, and i found something im wondering..

I can trace something and work with events, or i can work like this:

Quote:

result=c_trace(blabla)
if (result == 1)
{
bla
}


so whats better? whats faster? does it make a difference?

and while we are on trace.. i need a little help with my code
Quote:

function tuer()
{
var trace_target[3];

vec_set(trace_target,player.x);
vec_rotate(trace_target, player.pan);
vec_add(trace_target, vector(100,0,0));

c_trace(my.x,trace_target,IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS);
}

void main()
{
level_load("sgcenter.wmb");
on_t = tuer;
}


I just want to find a door, a door i made as an entity and yeah.. its always gettin the error: "Crash in Tuer, Error 1513"


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: c_trace and events or not.. [Re: flutschi] #239096
12/02/08 15:36
12/02/08 15:36
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Error 1513 means you have a empty pointer in your code.
Is the player-pointer and the my-pointer not empty?

You can set at the beginning of your function tuer() following:
while(!my) wait(1);
while(!player) wait(1);

Re: c_trace and events or not.. [Re: Widi] #239099
12/02/08 16:03
12/02/08 16:03
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
I'm not sure it knows who "my" is in the c_trace command.

Maybe you want the player pointer?


I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: c_trace and events or not.. [Re: heinekenbottle] #239179
12/03/08 02:04
12/03/08 02:04
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
empty pointer was right..
thx a lot!


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: c_trace and events or not.. [Re: flutschi] #239192
12/03/08 05:59
12/03/08 05:59
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
now i did it this way:


Quote:
var trace_target[3];

vec_set(trace_target,player.x);
vec_rotate(trace_target, player.pan);
vec_add(trace_target, vector(1000,0,0));

c_trace(player.x,trace_target,IGNORE_ME|IGNORE_PASSABLE|USE_BOX);


shouldn't that trace all the things 1000 pixels (or what it is?) in front of the player?
and then in combinations with...

Quote:
action door_schalter()
{
my.emask |= (ENABLE_SCAN);
my.event = scan_event;
}


.. this on the door it should get ..
Quote:
function scan_event()
{
}


.. here?

it doesnt smirk


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875
Re: c_trace and events or not.. [Re: flutschi] #239349
12/04/08 07:04
12/04/08 07:04
Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
F
flutschi Offline OP
Junior Member
flutschi  Offline OP
Junior Member
F

Joined: Nov 2008
Posts: 53
Switzerland (Luzern)
can somebody help me with this?

would be great!


My System:
Intel Core 2 Duo CPU P8400 @ 2.26 GHz
4 GB Ram
NVIDIA GeForce 9600M GT
32 Bit Windows Vista
***********************************
Gamestudio Pro 7.50 / WED V6.875

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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