You are not logged in.
Pages: 1
About the ammo and cell,I use a code "powerup_spawn",but then it is too much on the ground,oni crashed
so is there any way to make powerups and weapons disappear after few seconds or minutes?
or how to make a charater drops powerups when he dead?
And about melee,I want only the player can't use combat moves or can't make any damage by melee,but not the AIs,is it possible?
Last edited by coool (04/11/08 00:04)
Offline
About the ammo and cell,I use a code "powerup_spawn",but then it is too much on the ground,oni crashed
so is there any way to make powerups and weapons disappear after few seconds or minutes?
This is from my fun script. You can use it aswell.
func void
reset(
void)
{
sleep 30000
timer_start 10 now
}
func void
now(
void)
{
weapon_reset
powerup_reset
fork reset
}
Offline
I don't know of any way to stop the player from using melee or make their melee do 0 damage, not without binary hacking. I don't think scripting can do it.
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Odd. I seem to remember there being one. Let me check.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
Hmm. I was thinking of using "Lock_keys", but there is no specific melee command.
...I don't know how much processing power this would take but...
...you could detect each of the attacking animations on Konoko, and if one of them happens, have her stop that animation.
I don't remember which function that is, but each one can look for up to 6 animations if IIRC. I don't remember if there is a general animation stopper or if you have to override it with a different animation. If I get lucky and manage to fix the computer I am working on right now, I can help you out more .
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
Oh yeah, good idea, Gumby. The wiki (I hope you all are checking the wiki on this stuff) has these functions to offer when looking for an animation:
chr_wait_animation [ai_name:string | script_id:int] [anim_name:string] - waits for a character to play a specific animation - chr_wait_animation 0 KONSPRrun_lt KONSPRrun_rt
chr_wait_animstate [ai_name:string | script_id:int] [anim_name:string] - waits for a character to reach a specific animation state - chr_wait_animstate 0 run_slide
chr_wait_animtype [ai_name:string | script_id:int] [anim_name:string] - waits for a character to play a specific animation type - chr_wait_animtype 0 jump
As Gumby indicates, you might have to list each and every melee animation using chr_wait_animation, but I would be interested in whether there is a melee "type" that could be used with chr_wait_animtype. But once you get the detecting-melee-animations part out of the way, you could use this:
chr_animate [ai_name:string | script_id:int] anim_name:string [num_frames:int] [interp_frames:int] - plays an animation on a character - chr_animate 0 KONOKOcycle_ride 500
to play an animation that doesn't do anything. What that animation would be, I have no idea. Maybe there's a "stand-still" animation, or a "breathing" animation.
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
You can also try the command:
chr_disable_melee - turns off all melee damage
But seems it disable all melee not only for one char.
Offline
chr_animate 0 KONOKOcycle_ride 500
Are you sure that doesn't do anything? Either way, it should only be played for 1 frame, not 500. That way Oni will 'pick up' Konoko's animation again, instead of being stuck in motorcycle pose.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
Aha~Thank you.And it seems that if the weapon is w8_mbo,player woun't use melee moves because the weapon makes much more damage than melee.
chr_wait_animtype
with this code,what's the type after animtype?punch,kick?if use this code,I think it's necessary to know all the types
Offline
Try punch and kick. I'm still working on getting a proper copy of Oni.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
chr_animate 0 KONOKOcycle_ride 500
Are you sure that doesn't do anything? Either way, it should only be played for 1 frame, not 500. That way Oni will 'pick up' Konoko's animation again, instead of being stuck in motorcycle pose.
Sorry, wasn't clear. I pulled that code from the wiki. The name of the animation was just an example. I don't suggest actually using that one.
with this code,what's the type after animtype?punch,kick?if use this code,I think it's necessary to know all the types
That's the problem, I don't know what the types are. I suggest experimenting
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Pages: 1