2 registered members (TipmyPip, 1 invisible),
18,731
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Need help with c_rotate !
#153928
09/13/07 16:41
09/13/07 16:41
|
Joined: Sep 2007
Posts: 9 Worms
True25
OP
Newbie
|
OP
Newbie
Joined: Sep 2007
Posts: 9
Worms
|
my script:
#include <acknex.h> #include <default.c>
Entity* wizard;
function main() { video_mode = 8; level_load("level1.wmp") }
action wizard_with_pointer() { wizard = my; my.ambiente = 100; }
an i get error :
1. video_mode = 8; / Read only mode 2. level_load("level1.wmp") / script error last line 3. my.ambiente = 100; / Parameter unknown ..
what do i wrong ?
Last edited by True25; 09/14/07 12:04.
|
|
|
Re: Need help with action !
[Re: vlau]
#153930
09/13/07 16:56
09/13/07 16:56
|
Joined: Sep 2007
Posts: 9 Worms
True25
OP
Newbie
|
OP
Newbie
Joined: Sep 2007
Posts: 9
Worms
|
|
|
|
Re: Need help with action !
[Re: True25]
#153931
09/13/07 17:02
09/13/07 17:02
|
Joined: Sep 2007
Posts: 9 Worms
True25
OP
Newbie
|
OP
Newbie
Joined: Sep 2007
Posts: 9
Worms
|
my.ambiente = 100; ... parameter unknown ! i think i have something forgett in my map  can you write me an example how get i the object to walk ?
|
|
|
Re: Need help with action !
[Re: True25]
#153932
09/13/07 17:12
09/13/07 17:12
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
Serious User
|
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
Have you read my previous post? it should be my.ambient=100Quote:
can you write me an example how get i the object to walk ?
Code:
var moveSpeed = 2; action myObject() { c_setminmax(my); while(my) { ent_animate(my,"walk",my.skill1,ANM_CYCLE); my.skill1 += moveSpeed * time_step; my.skill1 %= 100; c_move(my,vector(moveSpeed*time_step,0,0),nullvector,GLIDE); wait(1); } }
Just an example. Usually you can find your answer by searching the forum or read the AUM.
Last edited by vlau; 09/13/07 17:15.
|
|
|
Re: Need help with action !
[Re: True25]
#153935
09/14/07 05:50
09/14/07 05:50
|
Joined: Aug 2005
Posts: 1,558 HK
vlau
Serious User
|
Serious User
Joined: Aug 2005
Posts: 1,558
HK
|
It's easy, just modify this line :
c_move(my,vector((key_w-key_s)* moveSpeed*time_step,0,0),nullvector,GLIDE);
While holding 'W' object walk forward, 'S' walk backward and stop while none of them are pressed.
And add this line to turn if you like :
c_rotate(my,vector((key_a-key_d)* moveSpeed * time_step,0,0),USE_AXIS);
Pressing 'A' and 'D' to turn left and right.
|
|
|
Re: Need help with action !
[Re: vlau]
#153936
09/14/07 12:00
09/14/07 12:00
|
Joined: Sep 2007
Posts: 9 Worms
True25
OP
Newbie
|
OP
Newbie
Joined: Sep 2007
Posts: 9
Worms
|
thanks .. i would like to use c_rotate(my,vector((key_a-key_d)* moveSpeed * time_step,0,0),USE_AXIS); if(Key_d) { } to turn right - but how should be the angel ? thanks  - it is possible after one action the animation to bring to frame 1 example: ent_animate(my,"run",0,ANM_CYCLE); but not so hard .. softly 
Last edited by True25; 09/14/07 12:14.
|
|
|
|