2 registered members (7th_zorro, dr_panther),
724
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: [Doubt with the energy balls]
[Re: Xarthor]
#181793
02/04/08 22:47
02/04/08 22:47
|
Joined: Oct 2007
Posts: 34
Morph
OP
Newbie
|
OP
Newbie
Joined: Oct 2007
Posts: 34
|
Hi, thanks. I have some problems... 1)I use the event_impact (in the enemy action) and event_entity (in the energy_ball function), now, this works very good, but the event_entity searchs all entities include the player. I want that searchs all entities EXCLUDE the PLAYER. 2)Also i have a problem in this code: Code:
function ENDME() { switch(event_type) { case EVENT_ENTITY: my.alpha -= 20 * time; effect(explo,50,my.x,normal); wait (1); effect(explo_smoke,40,my.x,normal); ent_playsound (you, explosion, 300); // sword sound ent_remove (me); case EVENT_BLOCK: my.alpha -= 20 * time; effect(explo,50,my.x,normal); wait (1); effect(explo_smoke,40,my.x,normal); ent_playsound (you, explosion, 300); // sword sound ent_remove (me); } }
Put me a error in this: Invalid parameters ":" Help me. bye
Begginer in 3D Game Studio
|
|
|
Re: [Doubt with the energy balls]
[Re: Morph]
#181794
02/05/08 09:08
02/05/08 09:08
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Add this line in the while loop of your energy ball: you = player; and use the flag IGNORE_YOU for the c_move, that should do it. If you have trouble with that you might want to check out IGNORE_PUSH and set the push value of the player entity lower than the energy ball push value. About your function ENDME: As far as I can tell from the manual, you need a break; at the end of each case branch: Code:
function ENDME() { switch(event_type) { case EVENT_ENTITY: my.alpha -= 20 * time; effect(explo,50,my.x,normal); wait (1); effect(explo_smoke,40,my.x,normal); ent_playsound (you, explosion, 300); // sword sound ent_remove (me); break;
case EVENT_BLOCK: my.alpha -= 20 * time; effect(explo,50,my.x,normal); wait (1); effect(explo_smoke,40,my.x,normal); ent_playsound (you, explosion, 300); // sword sound ent_remove (me); break; } }
Quote:
The execution continues until either the closing bracket or a break statement is encountered
quoted: The manual (A7)
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|