0 registered members (),
1,251
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
spikeup & down
#86259
08/15/06 22:17
08/15/06 22:17
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
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
Expert
|
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
tek
OP
Member
|
OP
Member
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
fogman
Expert
|
Expert
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
tek
OP
Member
|
OP
Member
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
fogman
Expert
|
Expert
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]
#86266
08/15/06 23:14
08/15/06 23:14
|
Joined: May 2005
Posts: 222
tek
OP
Member
|
OP
Member
Joined: May 2005
Posts: 222
|
cool it works, thanks Thunder and fogman for your help.
Last edited by tek; 08/15/06 23:14.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|