OK, here i am!
I have some problem with INCLUDABLE AI.
I'll try to describe it.
Imagine, we have some mob, which sick with Morph disease. Morph disease does some symptoms and end it cause MORPH-ATTACK.
In this state client of mob would lose control over his mob, and mob must be controlled by AI for some time.
How to give control to AI for some time. AI designed in one procedure, it's important! It would try to run people, which was in FOV, breaking almost any obstacle in this way.
Sorry for language.
Disable player's ability to control the mob, turn on some AI code, after the AI code runs out, restore player's ability to control mob.
|
Game is Space Station 13. But there another build, which are horror.
Main problem is how to do executing of procedure for some time. Any functions of player must executes (Life(), regular_hud, etc.) excluding control of player. It should be one function, which take control of player's mob, and it executes for some time (60 seconds). How to do that? I repeat - main problem is how to do executing of ONE function for 60 second. Moveover, function can execute different actions. I have idea how to do that, but it may be hard. States. Imagine, here are few states: MORPH_WANDER MORPH_RUN MORPH_ATTACK In MORPH_WANDER state it will simply wande... no, run around and try to get target. If it could, then get A* path to target and change state to MORPH_RUN, where is try to run through this way. But if it can't do that, then it would run through obstacles and try to get as near as could. If it could reach target, then it change state to MORPH_ATTACK and will attack him. If target outreach from this zone, then it change state to MORPH_RUN and... you undestand what next. But how to do all that in one function? |
Lugia319 wrote:
Disable player's ability to control the mob, turn on some AI code, after the AI code runs out, restore player's ability to control mob. Pretty sure he wants someone to do it for him, or walk him through doing it. @EditorRUS: You'll have to get better acquainted with client/verbs procs and disable each one you feel should be. Primarily movement I would imagine, but also click behaviours and such. Firstly you will actually need a working AI code which I'm gathering you don't have? |
I had create it. AI, yes.
Problem with disabling client mob controlling i've solve very easy, in four lines. if (H.client) var/client/player = H.client player.eye = player.mob player.mob = null |
The player gets a disease, then after a time they become controlled by the AI like a zombie and the player loses control over it.
(I also gather you only want the AI to control the player for a time then give control back to the player?)
Kind of like the devourer does in Dungeon Master.
And you want to know how to do this?