Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Rastafariel

Allies
  • Posts

    30
  • Joined

  • Last visited

Rastafariel's Achievements

Apprentice

Apprentice (3/11)

0

Reputation

  1. Also, to add to the mix, Montana did one for Astrianna II that seems to work... awesomely.
  2. Cool. Thanks man. I'll just stick with the 2 spells then... btw... is this "the" Montana? =-) if so, I'm a big fan. Also totally agree with you on liberty.
  3. I'm going to try that out... once I get doen with work work.
  4. Revised Script: scn RasOperatingScript ref me short TH float timer short doonce float health Begin GameMode ;identify Ras set me to getself ;get max health for comparison Set TH to me.GetBaseActorValue Health ;set level to PC level -3 ;some function to do that later ;if activator for healing when loosing health ;doonce loop if doonce == 0 if me.Getav health != TH me.cast DNBGRegenerate me set timer to timer + getSecondsPassed set doonce to 1 endif endif if doonce == 1 if timer >= 10 set doonce to 0 set timer to 0 endif endif End NOTES: I'm now concerned that Toaster's Companion Script may be interfearing with this NPC script Im trying to run.... SO... I think I will disable Toaster's Mod for a bit to test this... Well, I think this is a wash because getbaseav health returns the base health at L1, not the base max health of the actor also getav health is the same as getcurrenthealth (except getav health works in the console so I think I'll use that in script)
  5. Thanks for the continued help HY! Now that we have two seperate functions for health, I dont think we need the qualifyer anymore. I can just take the base and gethealthhcanged in one script... I think.... (I'm going to modify it below and try it out)
  6. this is the current version of the script I'm working on, but it's not activating when the NPC takes damage. scn RasOperatingScript ref me short TH float timer short doonce float health Begin OnLoad ;identify Ras set me to getself ;get total health when spawned Set TH to me.GetBaseActorValue Health End Begin GameMode ;if activator for healing when loosing health ;doonce loop if doonce == 0 if me.GetCurrentHealth != TH me.cast DNBGRegenerate me set timer to timer + getSecondsPassed set doonce to 1 endif endif if doonce == 1 if timer >= 10 set doonce to 0 set timer to 0 endif endif End
  7. on the NPC. I just realized that even if this script works correctly, if the NPC is already spawned and wounded, it will not correct to max health because it will think its current health is max health. TES must have a getmaxhealth type of function... how could they not when maxhealth is derived from levels and endurance but you cant get it by endx2 cause end can change over level..... *pulls out hair* ____________ EDIT: ooh ooh... I think I can use GetBaseActorValue health to solve this problem, but I still don't have a working script yet.
  8. Ok so the final iteration looks like this: scn RasOperatingScript ref me short TH float timer short doonce float health Begin OnLoad ;identify Ras set me to getself ;get total health when spawned Set TH to me.getcurrenthealth End Begin GameMode ;if activator for healing when loosing health ;doonce loop if doonce == 0 if me.GetCurrentHealth != TH me.cast LL0RestoreHealthMajorLvl100 me set timer to timer + getsecondspassed set doonce to 1 endif endif if doonce == 1 if timer == 10 set doonce to 0 endif endif End
  9. Would a begin onload work like this? scn RasOperatingScript ref me short TH ;Total Health short timer short doonce Begin OnLoad ;identify Ras set me to getself ;get total health when spawned Set TH to me.getcurrenthealth End Begin GameMode ;if activator for healing when loosing health ;doonce loop if doonce == 0 if me.GetCurrentHealth != TH me.cast LL0RestoreHealthMajorLvl100 me set timer to timer + getsecondspast set doonce to 1 endif endif if doonce == 1 if timer == 10 set doonce to 0 endif endif End P.S. .... Why oh why are my tabs not showing in this post so hard to read script... OOH, code box - had no idea - TY IS =-)
  10. Oooooooh. Duh. =/ (Might be a moot point since getcurrenthealth doesnt seem to be a valid function even when Im modding with OBSE functions & CS.)
  11. Ok, I don't know about you guys, but vanilla oblivion npc healing AI seems to suxxors. So, I'm writing a script for actor healing (I'm sure there are many out there but I didn't see any =/) This is it so far, for discussion (and apparantly the function getcurrenthealth does not actually work... so I'm looking for a workaround) scn RasOperatingScript ref me short TH short timer short doonce Begin GameMode ;identify Ras set me to getself ;get total health when spawned Set TH to me.getcurrenthealth ;if activator for healing when loosing health ;doonce loop if doonce == 0 if me.GetCurrentHealth != TH me.cast LL0RestoreHealthMajorLvl100 me set timer to timer + getsecondspast set doonce to 1 endif endif if doonce == 1 if timer == 10 set doonce to 0 endif endif End
  12. Awesome man! Thanks for the help! This really improves my game getting into the scripting... maybe in 2 years I'll have it down... ______________________________________________ Hrm, well the if/else script didnt work for me so I went back to 2 spells and I just set SUMN to SummonRasRef, and the "Dismiss Spell" works: scn DismissRasScript ref SUMN Begin ScriptEffectStart set SUMN to SummonRasRef ;Move our creature back to it's holding cell SUMN.moveto CreatureCageREF 0 0 10 ;Reset our creature if dead SUMN.resurrect ;Set our creature to an unprocessed state SUMN.disable endif End
  13. Im scripting a work-around to be used in conjunction with Toaster's Companion Share 3.7 so that I can get a specific actor (in this case "Ras") to be summoned and dismissed to his cage without expending lots of running power for him to "run back to someplace" and also without the chance of him dying. So, my summons works and is compatable with CS 3.7 and especially keeps the inventory command working: ScriptName SummonRasSCR ;attempt to use spell timer vs. script timer - done ;now using short summon spell for 3 seconds with this script to summon actor with no timer float fade short playonce ref SUMN Begin ScriptEffectStart ;Set temp reference for scripting. ;Allows faster transition of script as template. Also allows for leveled summon. set SUMN to SummonRasREF ;Reset our creature if re-summoned before time runs out on spell SUMN.disable ;Now we move our creature to the Player ;Move the creature reference to the worldspace of the Player SUMN.moveto Player 30 30 10 ;Make our creature visible and active SUMN.enable SummonRasREF.SetIgnoreFriendlyHits 1 SummonRasREF.ModDisposition player 100 set fade to 1 ;Resets the alpha fade variable to 1 ;Play effect for creature entrance SUMN.pms effectSummonMythicDawn 1 End ______________________________________________________ My problem is with dismissing him to his hidey hole... when I set the spell to self, it transports the player, and Ras (the NPC) both to the hidey-hole (how odd?) When I set the spell to target, it CTD's Oblivion. =-) scn DismissRasScript ref SUMN Begin ScriptEffectStart ;if not player qualifier (these two lines added in attempt to only teleport the NPC, were not in orig. script) if getisreference player != 1 (so... getisreference player != 1 works, but the result is neither actors are transported... which now kinda makes sense...) (I guess I dont understand why if the script says SUMN.moveto x ... why the player is moving??) ;Move our creature back to it's holding cell SUMN.moveto CreatureCageREF 0 0 10 ;Reset our creature if dead SUMN.resurrect ;Set our creature to an unprocessed state SUMN.disable endif End -------------------------------------------- And I thought I had a totally cool workaround from Montana's totally awesome yet incredibly long summon/gohome/actor script....
  14. Thanks for your thoughts guys. There is a great mark/recall mod out already. What I'm trying to do here is essecntially teleport the char 5' in front of himself (in RP sense from D&D Shadowdancer ability to move within shadows and appear somewhere else... like through a pesky grate that others wouldnt be able to get through...) I have OBSE... so: placeatme markerobject direction distance <- one line to set the marker, no math involved. (the math would come in here - how do I get the marker say 5' in front of the player here? i.e. has to be 5' in front of the player need to get the angle the player is facing and then distance) player.moveto markerobject <- put the player in the right spot. (easy enough...) deletereference markerobject <- nuke the marker, and say goodbye to savegame bloat. (good idea) OK - update - so Im trying this now and I dont know the command deletereference (that doesn't work in the code when I script it) Uh, nm, I see I have to run CS with OBSE.... how does one do that? BTW, do I have to delete the REF if its a critter REF? I'm currently disabling it.
  15. Ok so, Im going to try a combo mark/recall spell script and attempt to mark the location about 5' in front of the player, and then move to it. Here is my script so far: scriptname DNBShadowStepScpt ;attempt at teleporting player 5' in front of himself (150 units) ;using creature marker called exTeleport2Ref1 float pos float ang ;(the measure of the angle, first deg, then radians) float ang2 ;(ang^2) Just for convenience. Could use ang*ang directly. float ang4 ;(ang^4) Just for convenience. Could use ang*ang*ang*ang directly. float sign ;sign correction float sin ;(sine of the angle) float cos ;(cosine of the angle) begin ScriptEffectStart ;Now, want to get player heading and location and move player 150 units. ;So, need to get player heading (north == 0, increasing clockwise, ;(east == 90), going up to 360.) Then use fourth/fifth order polynomial ;approximations for sin and cos. ;--sin, cos set sign to 1 set ang to player.getAngle z if ang > 270 set ang to ang - 360 elseif ang > 90 set ang to ang - 180 set sign to -1 endif set ang to 0.017453*ang set ang2 to ang * ang set ang4 to ang2 * ang2 set sin to sign*ang*(1 - 0.16605*ang2 + 0.00761*ang4) set cos to sign*(1 - 0.4967*ang2 + 0.03705*ang4) ;--Move Marker from Player set pos to player.getPos x + 150*sin exTeleport2Ref1.setPos x pos set pos to player.getPos y + 150*cos exTeleport2Ref1.setPos y pos set pos to player.getPos z + 55 ;--Tweak offset to put object on ground. exTeleport2Ref1.setPos z pos ;--Set angle relative to PC heading set ang to player.getAngle z + 90 end ;--Done with calculating marker 1 begin ScriptEffectFinish player.moveTo exTeleport2Ref1 playSound DRSOblivionGateOpen end _____________________________ COMMENTS: right now, it seems like all Im doing is going to my creature cage where the critter marker starts.... I'm being silly here I know it... any ideas what Im doing wrong?
×
×
  • Create New...