Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
[Doubt with the energy balls] #181791
02/03/08 21:20
02/03/08 21:20
Joined: Oct 2007
Posts: 34
Morph Offline OP
Newbie
Morph  Offline OP
Newbie

Joined: Oct 2007
Posts: 34
Hi all, look, i last found the attack animation and i add a energy ball at attack (with effects, fire, etc) . Ok, now, How i can make a collision between energy ball and the enemy?? and quit healh points?. Good, the first question is necessary, the second question hehe i know how done.

Bye


Begginer in 3D Game Studio
Re: [Doubt with the energy balls] [Re: Morph] #181792
02/03/08 22:13
02/03/08 22:13
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
1. create the energy ball using "ent_create"
2. move the energy ball using "c_move"
3. detect a collision via:
3.1. event_impact
3.2. event_entity
3.3. event_block

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 Offline OP
Newbie
Morph  Offline 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 Offline
Expert
Xarthor  Offline
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)

Re: [Doubt with the energy balls] [Re: Xarthor] #181795
02/05/08 11:54
02/05/08 11:54
Joined: Oct 2007
Posts: 34
Morph Offline OP
Newbie
Morph  Offline OP
Newbie

Joined: Oct 2007
Posts: 34
Yes but...and the error: Invalid character ":"?
What is the problem here?

Thx


Begginer in 3D Game Studio
Re: [Doubt with the energy balls] [Re: Morph] #181796
02/05/08 12:21
02/05/08 12:21
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
The problem is that you did not add the break; before the second case statement.
Or does the error still occure?

Re: [Doubt with the energy balls] [Re: Xarthor] #181797
02/05/08 13:05
02/05/08 13:05
Joined: Oct 2007
Posts: 34
Morph Offline OP
Newbie
Morph  Offline OP
Newbie

Joined: Oct 2007
Posts: 34
Happens still...but, break; or not break; the problem persist. Is in this ":". But i don't know what is...what do you think?


Begginer in 3D Game Studio
Re: [Doubt with the energy balls] [Re: Morph] #181798
02/05/08 14:26
02/05/08 14:26
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Well "switch .. case" is only available in A7 and Lite-C.
So if you save this file in the .wdl format you will have problems.
But I don't know what you are using.
Do you use Lite-C or C-Script?

Re: [Doubt with the energy balls] [Re: Xarthor] #181799
02/05/08 15:00
02/05/08 15:00
Joined: Oct 2007
Posts: 34
Morph Offline OP
Newbie
Morph  Offline OP
Newbie

Joined: Oct 2007
Posts: 34
Lite-C man! i use A7 version


Begginer in 3D Game Studio
Re: [Doubt with the energy balls] [Re: Morph] #181800
02/05/08 17:42
02/05/08 17:42
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
allright than this is weird

Haven't used much of lite-c yet so I'm no expert at that field.

Page 1 of 2 1 2

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