New MOD that will make you never even think of playing oblivion... - by 37637598
37637598 on 1/6/2006 at 08:17
I'm working on a mod but stuck in a script...
_________________
Begin Mkb_TESTWALK
short State
If ( State == 0 )
AITravel 4333, 293, 202
set State to 1
endif
end
____________________
I used this script on an npc in an interior cell and it worked, i try in in an exterior, and it doesn't work... of course i had to change toe x, y, and z. anyone have any suggestions???
Yes the NPC is attached to the script
No he is not carrying too much weight
No he is not stuck on anything (I tried putting him in different places)
Yes the EXT. cell has a grid path
Yes he loads in the game and acts like a regular npc (with no AI packages...)
~~~~~~~~~~~~~~~~~~~~~~~~~~
The mod is a huge addition to morrowind and is soon to be at its peak... As seen before in one of my old 2004 postings. I have made a prison that the player and npc's go to for committing random crimes, prison may be escaped and there is now a death sentence that consists of many ways to die including your head cut off, fed to the wolves, being hung, burned, it depends where you're at... Going to jail is now a process. You can become king, of serve the king, help someone else to be king, find a queen, build a house "And literally customize it IN GAME", you can grow plants, train animals, play instruments, start a band, start a shop, shop owners now open/close their shop in real time, and shops are now part of the ext. world so no more loading, or being able to hide from guards by entering a shop...
there is so much more that i haven't even said yet... The rest is to come... I must go... Thanks for help.
cyrano on 1/6/2006 at 18:43
AITravel is a sensitive function: many factors could account for your difficulties, but the most common problems are related to the distance from the starting point to the ending point and obstructions-if line of sight cannot be established the AI will sometimes stand in place. The use of multiple waypoints and pathgrids can increase the likelihood of success. The fact that it worked in an interior cell but not an exterior is consistent with what I mentioned. It is probable that the distances were not great in the interior cell and that a pathgrid existed.
I do not know how great a distance you are attempting to traverse but breaking it up into a series of intermediate points might be advised. In my experience keeping the distance between waypoints less than 2000 units is more reliable and certainly less to avoid obstacles and to maintain line of sight between adjacent waypoints. Adding (or editing and existing) pathgrid will also help, but note that pathgrids cannot be made continuous across cell boundaries. Here is an example of how you might structure your code for multiple waypoints:
Code:
short state
if ( state == 10 ) ; initiates travel
AITravel, x1, y1, z1 ; point 1
set state to ( state + 10 )
elseif ( state == 20 )
if ( GetAIPackageDone == 1 ) ; NPC has arrived at point 1
set state to ( state + 10 )
endif
elseif ( state == 30 ) ; initiates travel
AITravel, x2, y2, z2 ; point 2
set state to ( state + 10 )
elseif ( state == 40 )
if ( GetAIPackageDone == 1 ) ; NPC has arrived at point 2
set state to ( state + 10 )
endif
[etc.]
endif
For more complicated AITravel considerations such as how to recover from interruptions in the NPC's progress when the player rests or utilizes fast-travel, you might want to study the scripts in GhanBuriGhan's
Traveling Merchants. Good luck with your project.
37637598 on 3/6/2006 at 00:16
wow, you just fixed my problem, and you also fixed another one that i just ran into... the end point wasn't in sight so he stood still. thank you for your help!
RyushiBlade on 3/6/2006 at 03:17
Cyrano is a scripting god. You should check out a few of his (
http://home.earthlink.net/~cyran0/MWPage.htm) mods sometime :thumb:
And of course, everytime you click that link, a penny is donated to the Ryushi Fund.
(I wish).
cyrano on 3/6/2006 at 20:48
Well… this is awkward.
First 37637598: I am glad that it is working out for you, but perhaps you shouldn’t use your social security number as your user name. :cheeky:
Now for the rest of you: Allow me to qualify Ryushi’s excessive praise. I am no scripting god. His hyperbole was just the result of youthful enthusiasm and blind partiality (except for the part about my paying him to shill my website :sly: ). Ryushi tribute was misguided but well-intentioned, and I am confident that we will make allowances for the loyalty of a good friend and forgive his exuberance.
RyushiBlade on 4/6/2006 at 04:45
That works for me :D
37637598 on 5/6/2006 at 20:28
Actually 37637598 isn't a soc. sec. number, its one of those computer generated passwords that i use to help me remember it. I used to have another account and someone figured out the password so i had to change it and 37637598 is what the computer gave me for a password.
MOD--
Prison... Prison prison prison... I wish... I wish there was a way to use the gotojail function without transporting player to a prison marker... Hmmm... That way when you go to jail, The game will StiLL take away all of the players weapons... I tried using a prison marker but it just crashed the game... It was even in an exterior cell...
37637598 on 5/6/2006 at 20:31
Ooooh... maybe i figured it out... I have to make the prison marker transport... hmmm./..
Dain on 20/6/2006 at 10:52
hey u reckon u could put a aproximate date on when ull be done? if u havent got any idea well.... good luck with the mod.
37637598 on 24/6/2006 at 06:48
I have no clue but i'm trying to finish it by the end of this year 2006... i have alot of other stuff going on... music, work, living... It's something i do in my spare time...