-
Posts
65 -
Joined
-
Last visited
Everything posted by Oblis
-
Yes I fixed that! Created 4 npcs, made them alla follow each other 1-2-3-4-1 and with scripting made them heal buff etc.
-
Hello, I recently made a script that removes some items from an actor (armor, weapons etc) But when the items are removed (via RemoveItem function) I get a bug The animation of this actor shooting with bows is bugged. He makes the animation with bow but he fire invisible arrows and does no damage. I tried unequipitem but the bug is not any more. Have ye seen this before?
-
Hello, I have created a party of NPC actors. I want them to concider each other as companions. I want healer to heal companions and priest to shield them. I tried Accompany package to link each other 2to1,3to2,4to3,1to4 but it doentseem to work. Maybe need a script? Any thoughts?
-
Ye guys I had done mistakes on my code but now I have fixed them. Thanks for the valuable help.
-
Hello, This is a part from a script I wrote that will disable the use of armor to some kind of classes like monks, mages etc. The scripts works just fine with the only problem that it removes the clothing too. Some clothes have the same weight with fur armor and I have to allow the use of fur armor if I rise the weight allowance. Thats why I thought to use the GetObjectType to tell the script not to do this when the item is Clothing. I typed the ( Gauntlets.GetObjectType != 22 ) etc to tell the program "If the item IS NOT Clothing and its weight IS higher that 0" then DO THE SCRIPT But the sript is bypassing this line and keeps removing the clothes from npcs. I dont know what I may havent do right. Anyone can help? .... .... ref ItemType ref Weapon ref Helmet ref Chest ref Greaves ref Gauntlets ref Boots ref Shield .... ,,,, set Weapon to RAIDER.GetEquippedObject 16 set Helmet to RAIDER.GetEquippedObject 0 set Chest to RAIDER.GetEquippedObject 2 set Greaves to RAIDER.GetEquippedObject 3 set Gauntlets to RAIDER.GetEquippedObject 4 set Boots to RAIDER.GetEquippedObject 5 set Shield to RAIDER.GetEquippedObject 13 .... .... If ( Helmet.GetObjectType != 22 ) && ( Raider.GetWeight Helmet > 0 ) RAIDER.RemoveItem Helmet 1 Player.Additem Helmet 1 Endif If ( Chest.GetObjectType != 22 ) && ( Raider.GetWeight Chest > 0 ) RAIDER.RemoveItem Chest 1 Player.Additem Chest 1 Endif If ( Greaves.GetObjectType != 22 ) && ( Raider.GetWeight Greaves > 0 ) RAIDER.RemoveItem Greaves 1 Player.Additem Greaves 1 Endif If ( Gauntlets.GetObjectType != 22 ) && ( Raider.GetWeight Gauntlets > 0 ) RAIDER.RemoveItem Gauntlets 1 Player.Additem Gauntlets 1 Endif If ( Boots.GetObjectType != 22 ) && ( Raider.GetWeight Boots > 0 ) RAIDER.RemoveItem Boots 1 Player.Additem Boots 1 Endif
-
Giving different refIDs to same placeatme object
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Yes this is the simplest solution. Since PlaceAtMe is not the best choice for a script (especially for actors) I created them as persistent refs. Then I made waves of five each time. Every wave has different npcs so the purpose of a real stronghold defence (the idea of my mod) will stay. Thanks -
Can you help me add specific spells on an actor?
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
ok thanks -
Hello, I created the following quest sctipt: I summon actors from the same BaseObject and give them a refID so I will be able to use functions on them. I know that every time I give the same RefID to the placed object. Result of this is that the previous placed actor will reset its class due the new number rolled. (obvious). So if i wait for 3 loops for example, I will get 3 npcs and they eventually get the same class (the one that was rolled at the last time). I belive that if every npc placed could get a different refID everything would be perfect. But how? I was thinking if it is possible to give different RefID somehow at every loop. Any ideas? ScriptName NPCStrongholdQuest Float Countdown Short RaidCountdown Short RaidTrigger Short NPCStrongholdRaider01ClassTrigger Short NPCStrongholdRaider02ClassTrigger Short NPCStrongholdRaider03ClassTrigger Short NPCStrongholdRaider01Class Short NPCStrongholdRaider02Class Short NPCStrongholdRaider03Class ref NPCStrongholdRaider01Object ref NPCStrongholdRaider02Object ref NPCStrongholdRaider03Object Begin GameMode set Countdown to getsecondspassed If RaidTrigger == 0 Set RaidCountdown to 30 Set RaidTrigger to 1 Endif if RaidTrigger == 1 if RaidCountdown > 0 Set RaidCountdown to RaidCountdown - Countdown Message "New raid in %.0f seconds" RaidCountdown endif if RaidCountdown <= 0 Set NPCStrongholdRaider01Object to NPCKeepTeleportationInterior.PlaceAtMe NPCStrongholdRaider01 set NPCStrongholdRaider01Class to RAND 1 17 if NPCStrongholdRaider01Class == 1 NPCStrongholdRaider01Object.SetClass Warrior endif if NPCStrongholdRaider01Class == 2 NPCStrongholdRaider01Object.SetClass Mage endif if NPCStrongholdRaider01Class == 3 NPCStrongholdRaider01Object.SetClass Thief endif if NPCStrongholdRaider01Class == 4 NPCStrongholdRaider01Object.SetClass Priest endif if NPCStrongholdRaider01Class == 5 NPCStrongholdRaider01Object.SetClass Warlock endif if NPCStrongholdRaider01Class == 6 NPCStrongholdRaider01Object.SetClass Assassin endif if NPCStrongholdRaider01Class == 7 NPCStrongholdRaider01Object.SetClass Rogue endif if NPCStrongholdRaider01Class == 8 NPCStrongholdRaider01Object.SetClass Sorcerer endif if NPCStrongholdRaider01Class == 9 NPCStrongholdRaider01Object.SetClass Knight endif if NPCStrongholdRaider01Class == 10 NPCStrongholdRaider01Object.SetClass Bard endif if NPCStrongholdRaider01Class == 11 NPCStrongholdRaider01Object.SetClass Battlemage endif if NPCStrongholdRaider01Class == 12 NPCStrongholdRaider01Object.SetClass Barbarian endif if NPCStrongholdRaider01Class == 13 NPCStrongholdRaider01Object.SetClass Acrobat endif if NPCStrongholdRaider01Class == 14 NPCStrongholdRaider01Object.SetClass Nightblade endif if NPCStrongholdRaider01Class == 15 NPCStrongholdRaider01Object.SetClass Monk endif if NPCStrongholdRaider01Class == 16 NPCStrongholdRaider01Object.SetClass Healer endif if NPCStrongholdRaider01Class == 17 endif MessageBox "Raiders have arrived" Set RaidTrigger to 2 endif endif if RaidTrigger == 2 Set RaidTrigger to 0 endif End
-
Can you help me add specific spells on an actor?
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
You mean add the leveled lists to npc and then check its spellbooks for spells. Thats a quite good idea i think. Note: Just have in mind that leveledspelllists cannot be added or removed from npc with script. -
Can you help me add specific spells on an actor?
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Ok! Grab the spells from the list (or from a leveledspell list), check their school and add them to the actor (if restoration). So I will not be forced to type a thousand lines for each class or spell school. -
Can you help me add specific spells on an actor?
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Thanks for the reply guys The script you give me is "handmade" job. I was thinking for something more automatic... like using a leveledlist for example... Thanks -
Checking an actor if they have an item
Oblis replied to scarycave's topic in Oblivion's Classic Discussion
I m using to check if an npc carries and item.Use it in a if statement. Here is an example: if NPC.GetItemCount NPCClassWarriorToken == 0 ; Checks If the npc doesnt have the token in his inventory .... .... endif if NPC.GetItemCount NPCClassWarriorToken == 1 ; Checks If the npc has the token in his inventory .... .... endif -
Make MiscObject that tracks coordinates
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Thats interesting? How shall I update them? Disable-Enable? or there is some specific function? And we speak to do this through the console eh? Also when i summon the chest (I made it persistent too) it will not appear the open icon in the new position. Maybe this need to be updated too. I tried Disable/Enable through script but it doesnt seem to work properly, while through the console it works. After re-enable it is capable to be opened. Finally i'd like to ask if there is in Console or In Script any command that will drop the flying object to the ground (like z in TES Construction Set) Anyone knows? -
Make MiscObject that tracks coordinates
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Hello, Thanks for replay I have maneged to make what I was trying to do before I read this. 1. I created a persistent Object (a plate) to an empty TESTcell. 2. Made this Object not to be able to be added to inventory by using Begin OnAdd etc. 3. Created a spell that will move the item to me (using MoveAt function). 4. Using z button I can move it to the location I like. 5. Created a spell that will summon a chest to the player with decorations in it (chairs, shelves, beds etc) 6. The player selects what he likes and the decoration is placed (using PlaceAtMe) to the location the Object is. 7. Using the console SetPos and SetAngle I adjust the item a bit to match my desires. I did this thing with the Object because when I just placed a Decoration in frond of me and moved it around the room, only the mesh was moving. The colision and the activation werent moving around. This is my short story -
Make MiscObject that tracks coordinates
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
I thought that but is possible to make a persistent misc item that it will be unable to put it in inventory even with mistake? -
Make MiscObject that tracks coordinates
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
I make something a misc item working like compass. Where the item is moved the console prints the coordinates. (I dont want to do this on player) With a persistent item everything would be perfect, but when it is added in inv it loses it persistent attibute. That was cool with PlaceAtMe that allowed me to use the item as tesporarly persistent. GetSelf gives bad results (if it worked there would be no problem) -
Hello, I have created a spell that will place an item to the player. I made it this way (and not using additem) in order to give the item a reference. The item is placed properly and it gives me the coordinates at the current point. The following spell script works just fine: ScriptName NPCSummonLocationItemSpellScript ref LocationObject float PosX float PosY float PosZ float PlayerPosX float PlayerPosY float PlayerPosZ float ObjectOnAir Begin ScriptEffectStart set PlayerPosZ to Player.GetPos Z ;Setting a reference to a placed object. set LocationObject to Player.placeatme NPCDecorationLocationTrigger 1,20,0 ;These line will make the item appear always over ground. set PlayerPosZ to Player.GetPos Z set ObjectOnAir to (PlayerPosZ + 50) LocationObject.SetPos Z ObjectOnAir ;These line will get the item current position using the reference i got. set PosX to LocationObject.GetPos X set PosY to LocationObject.GetPos Y set PosZ to LocationObject.GetPos Z ;Message for tracking PrintToConsole "GameModeObject: %0.f, %0.f, %0.f" PosX PosY PosZ end But I want to get the coordinates to other points too and I want this item to produce the coordinates at (game mode) or when it (moved or dropped). Thats why i created the following script: ScriptName NPCDecorationLocationScript ref Object ref LocationObject float ObjectLocationPosX float ObjectLocationPosY float ObjectLocationPosZ Begin GameMode Set ObjectLocationPosX to LocationObject.GetPos X Set ObjectLocationPosY to LocationObject.GetPos Y Set ObjectLocationPosZ to LocationObject.GetPos Z PrintToConsole "Coordinations: %0.f, %0.f, %0.f" ObjectLocationPosX ObjectLocationPosY ObjectLocationPosZ End but it gives me always 0,0,0 even if the object is staying at the same position as it fell and produced the coordinates. It doesnt work properly. What i have done wrong to the second script? How it can be done?
-
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Possibly yes. I just tell you what is happening in console. I think GetFirstRefInCell / GetNextRef can extend in more that 1 cell. (reference:ref) GetFirstRefInCell cell:ref type:int cellDepth:int includeInactiveRefs:bool Ye thanks for the help! It took much time but finally it worked as properly as it should. Keep the good work -
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
You forgot to end spoiler :) Anyway... The only error i get at them moment is a well known problem that occurs when there is not pesistent chairs in the cell. Since the GetFirstRefInCell is looking for persistent chairs it gives error if there are not any. This doesnt affect the game but only the npc which is just standing doing nothing. As i searched there is not way to make chairs persistent whrough a script and that why it will be always the problem. Also I m thinking that it could be done some additional lines in case there are not persistent ref in cell to do somthing else. (wander/sleep etc for example) -
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Replaced GetFirstRef with GetFirstRefInCell and it worked better. -
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Heh this is funny. I noticed that the array (at least what i see from the messages) fills with elements from the place I am. I mean that when I move from CELL to CELL I see the chairs around to be added to the array, even if the npc is not there. Why adding the chairs around the player to the array? Maybe this is the problem? -
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
I suppose this is for 3 right? I m definitevely sure that GetInSameCell will be very useful. But i cannot figure how... These changes actually gave me some results. Now I can check if the NPC is in the same sell with the object. I used GetParentCell Mayve it will help a bit to figure how to make them not incert chairs that are not in the same cell, in their array, but only the chairs that are in their parent cell? Dunno I m a bit lost on this... If (CurrentRef) if ( CellLastFrame == CurrentRef.GetParentCell ) If (CurrentRef.NameIncludes "Chair") || (CurrentRef.NameIncludes "Stool") || (CurrentRef.NameIncludes "Bench") || (CurrentRef.NameIncludes "Cushion") ar_Append NPC20_Chairs CurrentRef PrintToConsole "%z: %n added to array" Name CurrentRef endif endif if ( CellLastFrame != CurrentRef.GetParentCell ) PrintToConsole "%z: This is somewhere else" Name endif Let CurrentRef := GetNextRef GoTo 100 endif -
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Well... unfortunatelly it didnt work. I used both your updated scripts but still i get the same things. I made some tests and the results are 1. When i first enter the npc01 cell, all the other companion are building their arrays with the chairs of the cell that the npc 01 is. I passed NPC01 and went to meet NCP02. All the NPC got his CELL chairs to add in their arrays. I believe that they are inactive until you meet them. When I enter their CELL they start counting their chairs. But everybody adds the first npcs i meet, the chairs and is going there. The result is that all the npcs are coming to that place. 2. I beleive that every npc in his script shall get a limit on what to add in his array. A good idea whould be that the npc will only check the CELL he is currently is, all the time, so he will fill his array all the time with new variables. Maybe when he changes CELL he can reset the array. Right now the script gives a mess because the npcs "see" and "add" chairs that they never know to excist. 3. Sometimes I get errors in console as you can see in the screenshots: http://i208.photobucket.com/albums/bb180/Aramis1979/Bug2.png http://i208.photobucket.com/albums/bb180/Aramis1979/bug1.png It has something to do with the LET command... -
Make Actor Sit at random chair and read
Oblis replied to Oblis's topic in Oblivion's Classic Discussion
Thats why I am an amatur and you a master! Thanks a lot Here is the script I call from the above script This is only for NPC01 Even if I created a seperate script for each npc with its own array, the stuck all the sittable into a common array. (they all npcs load the same chairs and etc) The result is that every npc come to the place the NPC01 is. Maybe because in all scripts the variable CurrentRef has the same name? (I think this is a local variable eh?) This is the script i made for NPC01 and is the same for every npc. (The variable names change only). For example where you see NPC01 it will be NPC02 to the 2nd, NPC03 to the 3rd etc to NPC20.