Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by mistery. 12/05/26 12:48
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 2,576 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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 | 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