Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
And again one of my simple questions C_TRACE #237403
11/20/08 01:50
11/20/08 01:50
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
I want to use this line from the manual:
c_trace(my.x,your.x,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT);

It "shoots" from my.x to your.x. But i want to shoot a line
from my.x ahead. I dont know how to make this. What should
i use instead of your.x ?

I want to create a very simply weapon that just shoots from
my.pos or camera.pos in front of the player.

I know its easy for u gods out there smile

Edit
Shooting to the ground like in the manual to check the floor
would be easy. But shooting in front kills my brain cause
the player can look around.

Last edited by rayp; 11/20/08 01:53.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: And again one of my simple questions C_TRACE [Re: rayp] #237404
11/20/08 02:07
11/20/08 02:07
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
You could use
while(1)
{
VECTOR trace_target;
vec_set(trace_target,vector(5000,0,0)); // the weapon has a firing range of 5000 quants
vec_rotate(trace_target, camera.pan);

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

works for me. You can check out the ent_decal in the manual this is basicaly that just cut out the trace.



Last edited by GamerX; 11/20/08 02:10.

"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Re: And again one of my simple questions C_TRACE [Re: GamerX] #237408
11/20/08 02:20
11/20/08 02:20
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
thanx for quick reply im testing...

ive done this
Code:

ACTION __Main_Gun_Fire {


vec_set(temp,vector(5000,0,0)); // the weapon has a firing..
vec_rotate(temp, player.pan);

c_trace (player.x,temp,IGNORE_ME|IGNORE_PASSABLE);
}

on_mouse_left __Main_Gun_Fire;


first ive used VECTOR trace_target. But it says "UNKOWN
KEYWORD VECTOR" so i used temp ? And ive used player.x (my
player model) because my.x is empty in this case.

But it wont hit my entity (sprite) ?


Last edited by rayp; 11/20/08 02:29.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: And again one of my simple questions C_TRACE [Re: rayp] #237410
11/20/08 02:33
11/20/08 02:33
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
Well you are proly using C-script the code was lite-c but it should still be able to be changed to work.

What do you mean it wont hit your entity? Something in front of you?Can enplane a little better please.


"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Re: And again one of my simple questions C_TRACE [Re: GamerX] #237413
11/20/08 02:37
11/20/08 02:37
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Empty level. Just one entity, a sprite entity. Im walking directly in front of
it and press the mouse left. But the entitys shoot event is not triggered ?
The code u see above...
its a totally blank project just for testing this simple-gun-script

Last edited by rayp; 11/20/08 02:37.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: And again one of my simple questions C_TRACE [Re: rayp] #237414
11/20/08 02:39
11/20/08 02:39
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
Do you have ACTIVATE_SHOOT in the c_trace because up there you don't.

Put this right after the c_trace to see if it at least tracing right.

draw_point3d(hit.x,vector(50,50,255),100,3);


Last edited by GamerX; 11/20/08 02:41.

"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Re: And again one of my simple questions C_TRACE [Re: GamerX] #237417
11/20/08 02:48
11/20/08 02:48
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
VERY GOOD! Ive forgotten ACTIVATE_SHOOT!

Thought it works now...but still my entity is not hit. frown
Nothing works in the last time...i should shut down my computer next time wink

Code:
ACTION __Main_Gun_Fire {


vec_set(temp,vector(5000,0,0)); // the weapon has a firing range of 5000 quants
vec_rotate(temp, player.pan);

c_trace (player.x,temp,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT);
}

on_mouse_left __Main_Gun_Fire;


And the entity
Code:
ACTION Sprite_Event {
IF(EVENT_TYPE==EVENT_SHOOT) {
 ENT_MORPH(ME,"leftf+23.tga");
 MY.SKILL3=4;
 MY._FORCE=0;
}
..
}

...
..
ACTION THE_SPRITE_TO_HIT {
MY.ENABLE_SHOOT=ON;
MY.EVENT=Sprite_Event;
..




Ive added draw_point3d(target.x,vector(50,50,255),100,3); and the trace seams
to went into the floor. When i look down and go near to the entity i can hit
it

Last edited by rayp; 11/20/08 02:51.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: And again one of my simple questions C_TRACE [Re: rayp] #237419
11/20/08 02:54
11/20/08 02:54
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Now it works! Thanx for ure great help man! At 04:00 in germany smile

working code
Code:
ACTION __Main_Gun_Fire {


vec_set(temp,vector(5000,0,0)); // the weapon has a firing range of 5000 quants
vec_rotate(temp, camera.pan);

c_trace (camera.x,temp,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT);
draw_point3d(target.x,vector(50,50,255),100,3);

}

on_mouse_left __Main_Gun_Fire;


changed player to camera smile


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: And again one of my simple questions C_TRACE [Re: rayp] #237420
11/20/08 02:56
11/20/08 02:56
Joined: Aug 2008
Posts: 218
U.S.
GamerX Offline
Member
GamerX  Offline
Member

Joined: Aug 2008
Posts: 218
U.S.
Ahh glad to help waiting for the new southpark lol.


"You may never know what results come of your action, but if you do nothing there will be no result."
-Mahatma Gandhi
Re: And again one of my simple questions C_TRACE [Re: GamerX] #237423
11/20/08 03:00
11/20/08 03:00
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
a bit off topic but i love southpark smile


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Page 1 of 3 1 2 3

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