Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 04/10/08 23:04

coool
Member
From: China Haikou
Registered: 02/12/08

Some problems about a "gun fight" level

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

#2 04/11/08 10:04

s10k
Member
Registered: 01/14/07
Website

Re: Some problems about a "gun fight" level

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

#3 04/11/08 11:04

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Some problems about a "gun fight" level

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

#4 04/11/08 11:04

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Some problems about a "gun fight" level

Odd. I seem to remember there being one. Let me check.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#5 04/11/08 11:04

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Some problems about a "gun fight" level

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 smile.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#6 04/11/08 12:04

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Some problems about a "gun fight" level

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

#7 04/11/08 13:04

s10k
Member
Registered: 01/14/07
Website

Re: Some problems about a "gun fight" level

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

#8 04/11/08 17:04

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Some problems about a "gun fight" level

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: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#9 04/12/08 03:04

coool
Member
From: China Haikou
Registered: 02/12/08

Re: Some problems about a "gun fight" level

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. smile


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 smile

Offline

#10 04/12/08 08:04

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: Some problems about a "gun fight" level

Try punch and kick. I'm still working on getting a proper copy of Oni.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#11 04/14/08 08:04

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Some problems about a "gun fight" level

Gumby wrote:

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.

coool wrote:

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 smile


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

Board footer

Powered by FluxBB