Jump to content

PushActorAway for Travel


Recommended Posts

I am trying to make a mod that flings the player to any direction that they choose.

To do this I made a spell and wrote a script for it that goes as follows:


Scriptname aaaMgntFlingScript

Begin ScriptEffectStart

pushactoraway player -100

End


When I had it set as cast on self, it would just launch me directly upward or slam to the ground depending on if I set it to either +/-100. I then decided to make it a targeting spell. I had better luck in the sense that if I targeted an NPC, I would get launched in their direction with a negative value. This was a step forward, but I do not want to rely on NPC to direct my trajectory. I then had the idea to script a custom item (a cursed doll in this case) with the intention of activating it mid-air to launch at whatever angle I wanted. The script for it goes as follows:


Scriptname aaaMgntDollScript

Begin OnLoad

pms effectAbsorb

pms creatureEffectWraithFaded

;this makes the doll look cursed;

End


Begin OnActivate

Player.Additem aaaMgntDoll 1

Cast aaaMgntFlingSpell player

Disable

End


Oblivion is weird in the sense that if this item has a script, you can activate it but not actually pick it up, the add item/disable command bypasses this issue. Unfortunately, my plan did not go as I had hoped. Instead of directing the "fling" in the direction of the doll, it has reverted to the first stage, where it just slams the player character to the ground. I had also tried going back to the first script, adding to it something along the lines of:


ref Doll

Begin ScriptEffectStart

set Doll to aaaMgntDoll

doll.pushactoraway player -100

End


But alas, this ended in failure. At this point I am realizing that objects cannot be a proper ref to the pushactoraway command, only NPC. This is where I left off for now. I am thinking maybe I will go back and create a custom "summon" spell that summons a Ram, and it will tackle the player and launch them that direction. No idea how I am going to do that, I would rather have the doll 🙂

Link to comment
Share on other sites

  • 2 weeks later...

thats a great idea! how do i make the rat persistent and disabled is my next task! i was working on some skyrim house mods for a while but i think im ready to delve back into oblivion, this will be a fun project to revisit! Wonder what i can do with the doll now, I still want to use it for a mod of sorts. anyone got any cool ideas? OR!! is there a way that i can script the invisible dead rat to be sort of "stuck" on the doll, so i can still use that to direct trajectory? will it break if the doll is ever picked up? i am still very new to modding lol :D

Link to comment
Share on other sites

Drag and drop the rat somewhere, right-click on it and tick the initially disabled and persistent reference boxes, give it a unique cell ID and use this cell ID with your moveto commands.

 

-As a golden rule always start you editor ID's with a letter otherwise Oblivion will crash more oftenly.

-To avoid the conflicts create editor ID's you are unlikely to find in other mods, a mix of your nickname a more or less short description and the acronym of your mod will make an excellent combination

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...