User talk:Iritscen: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(Polite request to Iritscen as well as to anybody who is willing to try this idea out)
No edit summary
Line 26: Line 26:
:- hypo usage emulation via "''chr_holdkey''" (if it will work) is on the other hand simply used to force '''any''' AI2 char (just input its name and be sure this char has a hypo in its inventory) to take a hypo and rest is handled by engine. Simple and effective.  
:- hypo usage emulation via "''chr_holdkey''" (if it will work) is on the other hand simply used to force '''any''' AI2 char (just input its name and be sure this char has a hypo in its inventory) to take a hypo and rest is handled by engine. Simple and effective.  
:--[[User:Loser|Loser]] 00:12, 17 March 2009 (UTC)
:--[[User:Loser|Loser]] 00:12, 17 March 2009 (UTC)
Loser, I have tried to get chr_holdkey to work for some time now. Peering at the asm, I can see that there is code there for it, but it might have been commented out in some form. It is really hard to tell. ALSO, using a hypo doesn't seem to be one of the allowable keys. They seem to be: forward, back, stepleft, stepright, crouch, jump, fire, altfire, punch, kick, action. HOWEVER, there is a different method we can use for AIs using hypos. Record Konoko using a hypo, export\import it using Onisplit, then use the from_here option in chr_playback. I would recommend using Konoko's watch animation or something of the sort to go along as a visual cue. [[User:Gumby|Gumby]]

Revision as of 16:47, 17 March 2009

Talk page archives: #1



Hi Iritscen,
it has been a long time since I have contributed something. I don't have time (and Oni) right now, but I ask you to try this idea out. It is connected to AI2 driven characters being able to actually use hypo sprays they possess to heal themselves (like the human player).
It could be easy as it involves only usage of BSL. However, I don't know if several things (mainly "chr_holdkey" command, which is core of this idea) work the way I think they work.
Requirements for the experiment:
- take one AI2 character whose name you know from some level you like. But this AI should be near some savepoint for easy debugging.
- add function to the scripts of your selected level, which will be forked from your selected savepoint, where your AI2 spawns.
- this function will contain following commands:
"ai2_showhealth=1" - I think this is clear
"ai2_spawn name" - clear
"ai2_ignore_player=1" - to be able to experiment
"chr_inv_reset name" - to make sure we have everything under control
"chr_givepowerup name hypo" - now we know our AI2 char has one hypo
"chr_set_health name 1" - to make it logical to use a hypo ^_^
"chr_wait_animtype 0 crouch" - to be able to trigger it when you want
"chr_holdkey name keys_hypo 10" - THIS IS IT. Key part, if I understand that command right
- now run the selected savepoint of selected level, don't crouch, get to your AI2, which is active but ignores you as a player and has only one HP left. NOW crouch. If everything goes according to the theory, this AI2 will use its one hypo to heal itself. Obviously should be seen with "ai2_showhealth=1".
- if it works, please let us (community) know. This way, we can set up smarter behavior for AI2s, where AI2s heal themselves in battle. Well, they try at least, because if they get hit, healing effect is reduced, as we know. And we cannot command AI2 to "play defensively because it used a hypo and healing is in the process". At least not the BSL way.
- also, this could be used for some daodanized AI2 characters, where AI2s inject hypos to get into regular overpower mode.
- I am aware of the fact that we can use "chr_set_health" command to do the same work. However, "chr_set_health" is dependent on the value it has written in, so you have to set up some mechanisms to reduce the value in "chr_set_health" command as AI2s health drops if we want to use it as an hypo emulation. Plus it is tied with only one AI2 character then.
- hypo usage emulation via "chr_holdkey" (if it will work) is on the other hand simply used to force any AI2 char (just input its name and be sure this char has a hypo in its inventory) to take a hypo and rest is handled by engine. Simple and effective.
--Loser 00:12, 17 March 2009 (UTC)

Loser, I have tried to get chr_holdkey to work for some time now. Peering at the asm, I can see that there is code there for it, but it might have been commented out in some form. It is really hard to tell. ALSO, using a hypo doesn't seem to be one of the allowable keys. They seem to be: forward, back, stepleft, stepright, crouch, jump, fire, altfire, punch, kick, action. HOWEVER, there is a different method we can use for AIs using hypos. Record Konoko using a hypo, export\import it using Onisplit, then use the from_here option in chr_playback. I would recommend using Konoko's watch animation or something of the sort to go along as a visual cue. Gumby