Jump to content

porroone

Members
  • Posts

    237
  • Joined

  • Last visited

Everything posted by porroone

  1. So, let me get this straight are u trying to make the dragon fly without even touching papyrus, how ?? ive been trying to do a flying mount myself and got stuck on getting the player x-plane and z-plane, I only seem to be able to get those from the dragon, and the dragon only likes to move in the z-plane, so am I going insane here trying to get it done with papyrus when it can be done in another way ??
  2. So im currently working on a dragon ride that flies, I got some kind of flying working but it just works on the z-plane and increasing the y-plane, so basically it flies, problem comes that while riding I've been only able to get 2 conditional, IsRunning that apparently only works in player and IsSprinting which works with the dragon (GOD KNOWS WHY), so basically the only movement I can get is flying both forward and up at the same time which gets kind of annoying, I can only turn around if I stop moving . My question is how to get the players view angle while he's riding so I can use those angles to tilt the dragon up or down, maybe even roll lol. Here's is my code, its full of debug s***, and stuff that doesnt work very well right now since im doing tests on variables, but maybe somebody can point me in the right direction. Thanks. Scriptname _DragonScript extends Actor import Utility import form import debug import math import idle Actor Property Dragon auto Actor Property Player auto idle property MTIdle_Hover auto float ay float xp float yp float zp float height float direction float speed float toggle float dtime _RAngle property MasterScript auto _RAngle scriptVar auto State Idle Event OnActivate(ObjectReference Dragon) RegisterForUpdate(0.1) GoToState("FlightMode") dtime = 0 Enable() PlayAnimation(MTIdle_Hover) endEvent endState State FlightMode Event OnUpdate() scriptVar = masterScript toggle = 0 if Dragon.IsSprinting() speed = 50 zp = Dragon.GetPositionX() height = Dragon.GetAngleY()*Speed zp = zp - height xp = Dragon.GetPositionX() yp = Dragon.GetPositionY() direction = Dragon.GetAngleZ() if direction < 90 && toggle == 0 toggle = 1 yp = yp + (90 - direction)*speed xp = xp + (direction)*speed endif if direction < 180 && toggle == 0 toggle = 1 direction = direction - 90 yp = yp + (-direction)*speed xp = xp + (90 - direction)*speed endif if direction < 270 && toggle == 0 toggle = 1 direction = direction - 180 yp = yp + (direction - 90)*speed xp = xp + (-direction)*speed endif if toggle == 0 toggle = 1 direction = direction - 270 yp = yp + (direction)*speed xp = xp + (direction - 90)*speed endif if dtime < 20 dtime += 1 else dtime = 0 Debug.Notification(xp) endif TranslateTo(xp,yp,zp,xp,yp,zp,speed,0) else StopTranslation() endIf endEvent endState
  3. So im currently working on a dragon ride that flies, I got some kind of flying working but it just works on the z-plane and increasing the y-plane, so basically it flies, problem comes that while riding I've been only able to get 2 conditional, IsRunning that apparently only works in player and IsSprinting which works with the dragon (GOD KNOWS WHY), so basically the only movement I can get is flying both forward and up at the same time which gets kind of annoying. My question is how to get the players view angle while he's riding so I can use those angles to tilt the dragon up or down, maybe even roll lol. Here's is my code, its full of debug s***, and stuff that doesnt work very well right now since im doing tests on variables, but maybe somebody can point me in the right direction. Thanks. Scriptname _DragonScript extends Actor import Utility import form import debug import math import idle Actor Property Dragon auto Actor Property Player auto idle property MTIdle_Hover auto float ay float xp float yp float zp float height float direction float speed float toggle float dtime _RAngle property MasterScript auto _RAngle scriptVar auto State Idle Event OnActivate(ObjectReference Dragon) RegisterForUpdate(0.1) GoToState("FlightMode") dtime = 0 Enable() PlayAnimation(MTIdle_Hover) endEvent endState State FlightMode Event OnUpdate() scriptVar = masterScript toggle = 0 if Dragon.IsSprinting() speed = 50 zp = Dragon.GetPositionX() height = Dragon.GetAngleY()*Speed zp = zp - height xp = Dragon.GetPositionX() yp = Dragon.GetPositionY() direction = Dragon.GetAngleZ() if direction < 90 && toggle == 0 toggle = 1 yp = yp + (90 - direction)*speed xp = xp + (direction)*speed endif if direction < 180 && toggle == 0 toggle = 1 direction = direction - 90 yp = yp + (-direction)*speed xp = xp + (90 - direction)*speed endif if direction < 270 && toggle == 0 toggle = 1 direction = direction - 180 yp = yp + (direction - 90)*speed xp = xp + (-direction)*speed endif if toggle == 0 toggle = 1 direction = direction - 270 yp = yp + (direction)*speed xp = xp + (direction - 90)*speed endif if dtime < 20 dtime += 1 else dtime = 0 Debug.Notification(xp) endif TranslateTo(xp,yp,zp,xp,yp,zp,speed,0) else StopTranslation() endIf endEvent endState
  4. Finally I got it working!! now to focus on the script.. http://s15.postimage.org/idlwo898r/2012_02_12_00003.jpg
  5. Could somebody explain me this one, its driving me nuts. Thank you.
  6. Yes I think I know what you are doing wrong, the OnEquipped event doesnt takes ObjectReference, takes Actor. Scriptname TumbaFluteScript extends ObjectReference ObjectReference property sabreCat auto ObjectReference property sabreCatHome auto Event OnEquipped(Actor akActor) {no need for conditional here, the OnEquipped event is ran just one time, when you equip the item} sabreCat.MoveTo(Game.GetPlayer()) endEvent Try that, and how did u manage to get the sabrecat skeleton to be rideable? im trying to do something similar myself, maybe we can help each other.
  7. So basically I managed to make a rideable dragon creating a custom skeleton that uses the controller node of the horse skeleton, problem seems to be that the actor doesnt become a child of the bone, so when I move, the dragon moves, but I dont. Back in oblivion there was a node in the horse skeleton which was called ActorParent, that basically handle that (position and rotation of the player relative to the mounts) but I cant seem to find it in the skyrim horse skeleton, so I was wondering if somebody could point me in the right direction.
  8. Couldnt agree more, I just didnt use those modifiers and the author doesnt explain well what he wants to do, I was just showing the syntax, but yes if you want that on equipping the sword you better use modav, which basically what it does is to plus the value to the current skill (for example modav 20 with 60 sword skill will result in 80, and if you use -20 it will go back to 60).
  9. Yea I dont know what I was thinking when I read those functions, sorry mate, for some reason I was confusing them with the OnEquip and OnUnequip events :/ glad to see you got it working ^^
  10. Yea I dont really know about them tho, check the papyrus quest reference, you might find something there that suits you.
  11. Will nobody tell this poor guy that he needs to call the function inside an event ? This might help you, im not sure if its what you are trying to accomplish.. but at least it will show you the syntax. Scriptname MyScript extends ObjectReference Event OnEquipped(Actor akActor) Game.GetPlayer().SetPlayerValue(TwoHanded, 20) endEvent So when you equip the weapon it sets two handed to 20
  12. Are you defining the object that moves as a property ? you need to declare it as a property on the script then close the script, go to the panel where the Add/Remove/Properties are, select the script, click on properties, select the Object/Actor/whatever you want to move, then click on edit value, then 2 things will show up, cell and ref, where cell, the cell the object is and reference the object itself, If you dont do that, the script probably doesnt know what object needs to move, if you are doing what I just told and still getting the problem you migh want to try with a different function like SetPosition or TranslateTo, that last one is very useful since you can see the object move, so it helps for debugging purposes.
  13. Well I did got something working, I can ride bears and sabrecats, basically by creating a duplicate of a horse, and changing the race and skin to the animal you want(bear, sabrecats...) dragons will CTD you to deskpot, you need to create a special skeleton for them and add a controller node, the problem is my character doesnt attach to the mount, basically what I get is my character standing on the air with the ride animation and the ability to remotly control the custom mount, so if anybody would care to explain me how to parent, or how to create a parent node on the skeleton (im not sure how to do this, if its from the ck or from nifskope) so the character stays with the custom mount.
  14. Ok first you need to declare Feres as an actor property "Actor property Feres auto", then define the integrer, "Int FeresHealth" (never tried to delcare an int but im guessing it should look something like that. Then save and compile the script, go to the window where the script is, where you can see Add/Remove/Properties, select the script and go to properties, there you should see a variable named Feres, select it, click on Edit value, then 2 slidebars will popup, one with the cell and the other with the referençe, if your actor is on a specefied cell, select that cell, else select any and go to the ref and look for Feres under there. Once you have all that, you will get Feres in your script and you could manipulate him, problem is you cant just call functions outside events, so if you want to get the health, you probably are doing it ok, its just outside an event, so look on the OnLoad or OnActivate events, I dont know, depends on what you need.
  15. Yeah like an event: Event OnEquipped(Actor Player) {Do Stuff} endEvent I dont think its going to help you much with what you are trying to do tho, I cant help you there, been looking into that kind of functions myself and came up empty, let me know if you find anything.
  16. Well what I did with the 1h sword works, I guess it should do the same with the shield, just get rid of the NitriShape from the two handed sword, when you select the node you will see the mesh highlight, with all the triangles and stuff, remove that, then go to the shield, get the NitriShape and paste it under the BSFadeNode of the 2h sword that doesnt have a model inside, if it gives you the error that the blocks arent linked properly, check the nodes you copied, compare them with a working 2h sword and see whats missing, then change the needed childs. This isnt easy stuff, I've spent like 3h getting a dragon skeleton rideable without the game crashing and it was just a matter of adding a node to the skeleton, but then I had to link the stuff, parenting the node to the bone's child if I understood this s*** correctly, anyway GOOD LUCK.
  17. Well I have nothing, only that my skyedit edit of my weapon with unrelenthing force works pretty well, enemies like to fly. With the nifskope you mean changing a 1h sword to show on back? I've been trying to do it, I think you need to use a 2h weapon base mesh to create a new 1h sword or else copying the node from the 2h sword and implementing it to the 1h one, but thats a bit harder, I think it should be easier to get rid of the nitrshapedata of the 2h sword nif so you keep the nodes, copy the block of the nitrshapedate from the 1h sword and paste it on the empty 2h sword, that could actually work, give it a try and tell me how it goes. EDIT: Well that last part works, I tested for myself, got the daedric greatsword, removed the nitrshapedate, added my 1h sword (minor angle and position adjustments), I had to go to the creation kit and change the animation type on the weapon to 2H which doesnt change the weapon anim but makes it works, else it just doesnt draw the sword.
  18. You need to use the translate function instead of setposition, it should look something like this.. float PX = game.getPlayer().GetPositionX() + game.getPlayer().GetAngleX() * 100; float PY = game.getPlayer().GetPositionY() + game.getPlayer().GetAngleY() * 100; float PZ = game.getPlayer().GetPositionZ() + game.getPlayer().GetAngleZ() * 100; target.TranslateTo(PX,PY,PZ,0,0,0,SpeedYouWant(carefulwiththisvariable),0); Target needs to be declared either as an actor or objectreference property, else im not sure if angleX,y,z return a direction vector, that probably will set the object or actor in an odd position, anyway if it does return direction vector let me know, I have a few ideas to work with that, the translate instead of setting an instant position will move the object or whatever through the air so in any case it may help you debug, good luck ^^.
  19. Well its a bit hard at first, but you mess around with it and you get results, cool ones, im currently working on a ring that makes you fly using the translate functions running on OnUpdate events, its a lot easier than its seems you just need to get use to it.
  20. Equip and Unequipobjects are events not functions, you cant call them just like that.
  21. Not really, for example you go in the script and define ObjectReference property MyObject auto, then you close the script, go to the window where in the right side you see Add/Properties/Remove, select your script, go to properties, and there you should see "MyObject" which is the one we created on the script, select it, click on edit value, then you'll see 2 options that are pretty obvius, one is the the cell (where the object is) and the other the Reference, the name of the object you want to move to. It kind of helps having the same name as the object when you declaring, you can click on autofill and it finds you the reference directly without having you to look for it.
  22. Have you tried declaring the object as a property, then going to properties and looking for the object itself ? Im missing more information here, so if I understand this correctly you want the object as a target for the player to move to or rather an object that when the players activates, it moves the player to a different cell?
  23. Ok thats interesting seems like I cant apply the enchant to a weapon either ... you might be into something here. EDIT:Ok this is curious, skyedit does let you do it but the ck doesnt, I remember adding the Unrelenting force effect to a weapon, so everytime I hit a target it goes flying in the sky, I cant do that with the ck, at least not in the same simple way.
  24. Well the spellbreaker doesnt use script at all, its way much simplier than that, basically what it does is apply an enchantment with a condition (being that condition IsBlocking) nothing to do with Papyrus, you just need to create a new enchant, on the menu right click on conditions, new, on condition function select IsBlocking, where comparasion you use == and 1 in value and the shield will do as its told when block.
  25. What is PlayerFaction here ? something you created or something engine based ?
×
×
  • Create New...