Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,251 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
spikeup & down #86259
08/15/06 22:17
08/15/06 22:17
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
hi everyone I need help for the life of me I have tried everything, but I can't seem to make spikes I made make the animation of going up and down.
In the spike.mdl I gave it a couple of animations called spikeup 1, spikeup 2, spikeup 3 etc, ect. Yet I placed the spike.mdl in my game and gave it a script of.

Quote:


var spikeup_percent=0;
action spike_1
{
spikeup_percent=(spikeup_percent+5*time)%100;
ent_animate(me,"spikeup",spikeup_percent,ANM_CYCLE);
my.enable_impact=ON;
my.event=lev_2_event;
}




Yet when I run the game the spikes don't play the animation I also tried putting

while(1)
{
ent_cycle("spikeup", my.skill1);
}

and no dice.
it plays the animation only on the instance that I don't give the spike model and action, yet I want that when I touch it I go to the first level.
I would appreciate any help.

Last edited by tek; 08/15/06 22:19.
Re: spikeup & down [Re: tek] #86260
08/15/06 22:23
08/15/06 22:23
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Code:

function load_lev_2()
{
freeze_mode = 1;
load_level("level2.wmb");
wait(3);
freeze_mode = 0;
}

function lev_2_event()
{
if(event_type == event_impact || event_type == event_entity)
{
if(you == player)
{
load_lev_2();
}
}
}

action spike_1
{
my.skill1 = 0; //used as animation counter

my.enable_impact = on;
my.event_entity = on;
my.event = lev_2_event;

while(me)
{
my.skill1 += 5 * time;
my.skill1 %= 100;
ent_animate(me,"spikeup",my.skill1,anm_cycle);

wait(1);
}
}



Oh you should change the names of your animations though.
Remove the space between the frame name and the number.
like:
spikeup1
or spikeup01

Re: spikeup & down [Re: Xarthor] #86261
08/15/06 22:47
08/15/06 22:47
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
thanks thunder I wrote it just like you said but it gives me error

Quote:


<my.event_entity = on;>
MYNEWGAME.WDL 867 Error(50): Parameter unknown 2 Parameter




Last edited by tek; 08/15/06 22:52.
Re: spikeup & down [Re: tek] #86262
08/15/06 22:53
08/15/06 22:53
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Maybe you´ve forgotten a semicolon. Post your 49th, 50th and 51th line of code, then we´ll see what´s wrong.


no science involved
Re: spikeup & down [Re: fogman] #86263
08/15/06 22:56
08/15/06 22:56
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
Quote:

Maybe you´ve forgotten a semicolon. Post your 49th, 50th and 51th line of code, then we´ll see what´s wrong.




I don't think thats it it tells me the problem is in <my.event_entity = on;>
but heres what I put, I also change the frame names like Thunder told me, I made them, spikeup1, spikeup2, spikeup3.

Quote:

function load_lev_2()
{
freeze_mode = 1;
load_level("level2.wmb");
wait(3);
freeze_mode = 0;
}

function lev_2_event()
{
if(event_type == event_impact || event_type == event_entity)
{
if(you == player)
{
load_lev_2();
}
}
}

action spike_1
{
my.skill1 = 0; //used as animation counter
my.enable_impact = on;
my.event_entity = on;
my.event = lev_2_event;
while(me)
{
my.skill1 += 5 * time;
my.skill1 %= 100;
ent_animate(me,"spikeup",my.skill1,anm_cycle);
wait(1);
}
}




Last edited by tek; 08/15/06 23:04.
Re: spikeup & down [Re: tek] #86264
08/15/06 23:04
08/15/06 23:04
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Insteat of "my.event_entity = on;" try it with "my.enable_entity = on;"
But this is the only thing I can see so far...


no science involved
Re: spikeup & down [Re: fogman] #86265
08/15/06 23:05
08/15/06 23:05
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Oh yeah fogman is right, my bad.
just a typo I meant "my.enable_entity = on;" sorry for that

Re: spikeup & down [Re: fogman] #86266
08/15/06 23:14
08/15/06 23:14
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
cool it works, thanks Thunder and fogman for your help.

Last edited by tek; 08/15/06 23:14.

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