Jump to content

Begin OnTrigger only applies on actors


Zolo2006

Recommended Posts

Hey, trying to make a mod as portal, stumbled across the problem that my OnTrigger never activates except when colliding with an actor :S

 

ScriptName PortalBluePortaling
float angx
float angy
float angz
float nangx

short gotangles

Begin GameMode
if gotangles == 0
set angx to Player.getangle x
set angz to player.getangle z
set gotangles to 1
endif
If PortalStage == 1
set nangx to -angx
set Portalxpos to Portalxpos + 5 * (Portaldx * cos nangx)
set Portalypos to Portalypos + 5 * (Portaldy * cos nangx)
set Portalzpos to Portalzpos + 5 * Portaldz
BlueBall.setpos x portalxpos
BlueBall.setpos y portalypos
Blueball.setpos z portalzpos
reset3dstate
Endif
End

Begin onTrigger
If Portalstage == 1
Set Portalstage to 2
Endif
End

Link to comment
Share on other sites

It's a little light on info, but I'll try to help. I don't think you want to use the OnTrigger because, as you said, it's only for actors. If your portal works like a triggerzone, then you should use OnActivate, with (I think) a triggered variable.

 

I'm not much of a scripter, so if anyone else feels like contributing or saying I'm wrong (which is a possibility), go ahead.

Link to comment
Share on other sites

Hey, trying to make a mod as portal, stumbled across the problem that my OnTrigger never activates except when colliding with an actor :S

What else were you wanting this portal to collide with? Not quite understanding what you are trying to do here.

 

Also, anything that might use an ontrigger block MUST have an appropriate havok mesh as part of the .nif. What you might want to do is to use a triggerzone item and an activator that has no havok, and just have the triggerzone handle all the technical stuff while the activator handles the visual stuff. It may mean that you have to move around or locate a grouping of 2 objects to do the job of 1, but it makes setting it up a bit easier unless you know what you're doing within nifscope.

Link to comment
Share on other sites

Well right now I'm only trying to create the shooting function of it, so i want the ball to collide into whatever that comes in its way for example a wall or the ceiling, and there it will summon the portal.

 

Edited:

I used a Triggerzone, simply edited one of bethesdas... looked in the script for this particular one, said that it would trigger for any havok that came in to the zone, or something like that. Still same problem, only activates on actors, and clutter

Though I'm not sure i used it the trigger zone right

Link to comment
Share on other sites

  • Recently Browsing   0 members

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