|
|
Re: question about event_impact
[Re: JetpackMonkey]
#137021
06/18/07 13:17
06/18/07 13:17
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
the beam is set to my.passable = off and so is the target entity, i have tried c_setminmax as well to no avail.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: question about event_impact
[Re: jigalypuff]
#137022
06/18/07 14:58
06/18/07 14:58
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
Code:
var phaser_speed;
define _frameCt, skill22; define _hit, flag3;
function shipEvent() { if (event_type == event_block || event_type == event_entity || event_type == event_impact || event_type == event_push) { my._hit = on; } } function f_ship{ wait(1); c_setminmax(me); my.scale_x = 4.0; my.scale_y = my.scale_x; my.scale_z = my.scale_x; my.enable_entity = on; my.enable_impact = on; my.enable_scan = on; my.event = shipEvent; while (me != null && my._hit == off) { wait(1); } if (me != null) { ent_remove(me); } } function phaserEvent() { if (event_type == event_block || event_type == event_entity || event_type == event_impact || event_type == event_push) { if (you != null) { if (you == player) { error("player laser collision"); } } my._hit = on; } } function my_phaser() { wait(1); c_setminmax(me); my.scale_x = 200; my.scale_y = 0.5; my.scale_z = 0.5; my.passable = off; my.oriented = on; my.flare = on; my.bright = on; my.ambient = 100; my.pan = player.pan;//--->player.pan and tilt set to camera my.tilt = player.tilt; my.enable_block = on; my.enable_entity = on; my.enable_impact = on; my.enable_push = on; my.event = phaserEvent; phaser_speed.x = 50 * time; phaser_speed.y = 0; phaser_speed.z = 0; my._hit = off; my._frameCt = 0; while (me != null && my._hit == off) { //if (my.roll > 150) { //my.passable = off; //} my.roll += 25 * time; you = player; c_move(my,vector(phaser_speed*time,0,0), nullvector, ignore_passable | ignore_you); my._frameCt += 1; if (my._frameCt >= 20) { break; } wait(1); } if (me != null) { ent_remove(me); } }
|
|
|
Re: question about event_impact
[Re: testDummy]
#137023
06/18/07 17:00
06/18/07 17:00
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
dude thanks, that works great, now onto ever more confusion by trying to add a targeting code lol
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
Re: question about event_impact
[Re: jigalypuff]
#137024
06/20/07 16:27
06/20/07 16:27
|
Joined: Jul 2006
Posts: 91 Florida, USA
Knuckles
Junior Member
|
Junior Member
Joined: Jul 2006
Posts: 91
Florida, USA
|
this code is interesting. I just need to clarify something. This code checks to see if one entity has collided with another entity and then performs an action, right? Is that what this does:
if (event_type == event_block || event_type == event_entity || event_type == event_impact || event_type == event_push)
If so, then what qualities would event_impact have in order to check to see if an entity has collided with it? That's what I'm still wondering.
Last edited by Knuckles; 06/20/07 16:27.
|
|
|
Re: question about event_impact
[Re: Xarthor]
#137028
06/20/07 18:29
06/20/07 18:29
|
Joined: Nov 2005
Posts: 1,007
jigalypuff
OP
Serious User
|
OP
Serious User
Joined: Nov 2005
Posts: 1,007
|
and here`s a weird thing, i added an explosion code for when the target gets hit, but no explosion and the target shoots straight up into the air lol, still trying to figure that one out.
Why does everyone like dolphins?
Never trust a species which smiles all the time!
|
|
|
|