Jump to content

Need some more insight about an idea...


ABVXYzackattack

Recommended Posts

Hey. I need a little help with a mod I'm making. I'm wondering if this is possible.

 

Is there any type of script command that you can use to create or move an object relative to another? Like my example is that I'm trying to create an "artillery round" that you can "call in" by casting a spell at the ground, which creates a marker at the spell hit location, and, if it could be possible, move a specific marker to a location, let's say, 100 ft above the target marker, which would cast the fire spell from the airborne marker to the target marker. I know how to d everything else except the second marker's ability to move to that spot.

 

Does this make any sense? Is there any type of command which could allow that second marker to be moved to a specific location away from the base reference?

Link to comment
Share on other sites

The MoveTo function can do something like that. You can use something like

 

skymarker.moveto groundmarker 0 0 2000

 

This will move the skymarker 2000 units above the groundmarker. I don't think it will move the skymarker DIRECTLY above the groundmarker, but it'll be pretty close, and at that height, you probably won't notice the offset at all.

Link to comment
Share on other sites

Alright. I've used your command, which worked. But the script still doesn't work. I've set it up to what I think should work, but it still doesn't. You sound like you know what you're talking about. Can you see what's wrong with this:

 

scn ZArtillerySpellSCRIPT

 

ref BASETARGETref

 

Begin Gamemode

 

; Establishes first marker to aim from...

 

set BASETARGETref to GetActionRef

 

ZTargetBaseRef.moveto BASETARGETref

 

; Sets up second marker to cast from...

 

ZArtilleryRoundRef.moveto ZTargetBaseRef 0 0 150

 

ZArtilleryRoundRef.cast ZArtilleryFireSpell ZTargetBaseRef

 

end

Link to comment
Share on other sites

As far as I know, GetActionRef will not work the way you're trying to use it. I think it's intended to be used on people or objects and such, not the ground. You'll have to use something more complicated like the "Ground area mark that follows the ground" found here (this script requires OBSE) or some other script method to detect where your spell projectile hits the ground.

 

Other notes about your script:

- You don't need the line "ZTargetBaseRef.moveto BASETARGETref" You could simply edit the next line to "ZArtilleryRoundRef.moveto BASETARGETref 0 0 2000"

- 150 isn't very high. A normal character is 128 units high.

- The cast function won't work under some circumstances. To make sure it works, I suggest making ZArtilleryRoundRef and ZTargetBastRef activators. See the cast page for more info.

Link to comment
Share on other sites

Oh yeah. In the mods where I've used this method, I made the activators invisible. You can check out my mod "Doc Magic" if you want to see what I did. Honestly I don't remember exactly. I unpacked the meshes bsa, extracted the flamenode nif, maybe changed something about the alpha settings, made an invisible texture, etc.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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