Y U NO WORK

Post » Wed Jun 20, 2012 12:07 pm

Scriptname LeapOfFaithScript extends activemagiceffect  Event OnEffecStart()	       Game.GetPlayer().PushActorAway(Game.GetPlayer(), 0)	 Game.GetPlayer().ApplyHavokImpulse(0.0, 0.0, 800.0, 200)EndEvent

It's a scripted spell. I cast it in game and nothing happens. I'm almost certain Ive done this before.
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Wed Jun 20, 2012 3:47 pm

doesn't applyhavokimpulse ragdoll the player? Also, can you push something away from itself? how about a

mything = placeatme(something)
mything.pushactoraway(
mything.delete()

finally, what exactly is the effect you're going for? that might also help a solution.

late night brainstorming, no claims to sanity lol
User avatar
Jodie Bardgett
 
Posts: 3491
Joined: Sat Jul 29, 2006 9:38 pm

Post » Wed Jun 20, 2012 6:57 pm

lol

What I'm going for is a similar effect to what happens when a Giant hits you with his club.

When I was toying around with my old flying script I used something like

Event OnEffecStart(Actor Target, Actor Caster)          Caster.TranslateTo(Caster.GetPositionX(), Caster.GetPositionY(), Caster.GetPositionZ() + 800, 0.0, 0.0, 0.0, 1000.0)		 Caster.PushActorAway(Caster, 200)EndEvent

It was something close to that and it worked. It shot you straight up in the air, you went ragdoll. and it looked just like you had been hit by a giant's club.


but now it's not doing anything. I can't figure out why...
User avatar
Esther Fernandez
 
Posts: 3415
Joined: Wed Sep 27, 2006 11:52 am

Post » Wed Jun 20, 2012 5:07 am

You misspelled "OnEffecTstart"
User avatar
Naomi Ward
 
Posts: 3450
Joined: Fri Jul 14, 2006 8:37 pm

Post » Wed Jun 20, 2012 2:58 pm

Just look at my mod:
http://skyrim.nexusmods.com/downloads/file.php?id=13522

Scriptname zshWTHEffectScript extends ActiveMagicEffect

import math
import actor
import quest

int Property PushForce Auto
GlobalVariable Property zshpushpower Auto
ReferenceAlias Property zshWTHDieProtection Auto

Event OnEffectStart(actor Target, actor Caster)
if Caster == game.getplayer()
zshWTHDieProtection.ForceRefTo(Caster)
zshWTHDieProtection.registerforupdate(1)
endif

float PLAngleX
float PLAngleZ
float TrigAngleZ
float pushconst = zshpushpower.GetValue()

PLAngleX = Caster.GetAngleX()
PLAngleZ = Caster.GetAngleZ()
if ( PLAngleZ < 90 )
TrigAngleZ = 90 - PLAngleZ
else
TrigAngleZ = 450 - PLAngleZ
endif
Caster.PushActorAway(Caster, 0)
Caster.ApplyHavokImpulse((cos(TrigAngleZ)*cos(PLAngleX)),(sin(TrigAngleZ)*cos(PLAngleX)),(-sin(PLAngleX)), pushconst*PushForce)
EndEvent
User avatar
Francesca
 
Posts: 3485
Joined: Thu Jun 22, 2006 5:26 pm

Post » Wed Jun 20, 2012 12:38 pm

This should work (just tried it):

Game.GetPlayer().PushActorAway(Game.GetPlayer, 0)Game.GetPlayer().ApplyHavokImpulse(0.0, 0.0, 1.0, 10000)

The reason yours didn't work is because your float value of Z in the HavokImpulse was 800. You only need it to be 1.
User avatar
Alexander Horton
 
Posts: 3318
Joined: Thu Oct 11, 2007 9:19 pm

Post » Wed Jun 20, 2012 6:00 am

This should work (just tried it):

Game.GetPlayer().PushActorAway(Game.GetPlayer, 0)Game.GetPlayer().ApplyHavokImpulse(0.0, 0.0, 1.0, 10000)

The reason yours didn't work is because your float value of Z in the HavokImpulse was 800. You only need it to be 1.

Actually, it's a directional vector only, whether it's 1.0 or 1000.0, it's still the same direction if X and Y are both 0.0

Like I said, he misspelled the event name. You can have an event defined for an event that doesn't exist, which is a bit odd, but makes sense when you consider that they're just special functions. What he actually did was design a new event called "OnEffecStart" that the game never calls.
User avatar
Sylvia Luciani
 
Posts: 3380
Joined: Sun Feb 11, 2007 2:31 am

Post » Wed Jun 20, 2012 6:06 pm

rofl...
User avatar
Kieren Thomson
 
Posts: 3454
Joined: Sat Jul 21, 2007 3:28 am

Post » Wed Jun 20, 2012 1:38 pm

Just look at my mod:
http://skyrim.nexusmods.com/downloads/file.php?id=13522

Damnit Jim this is similar to my idea!

Thanks all for the help.
User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Wed Jun 20, 2012 9:23 am

And I have a similar spell in my mod...but mine tosses you up in the air and then tosses you sideways using the PushActorAway with a negative value, towards your destination. Kind of the Monty Python flying spell:

What is your name? What is your quest? What...is your favorite color?

Aieeeeeeeee!
User avatar
Jaki Birch
 
Posts: 3379
Joined: Fri Jan 26, 2007 3:16 am

Post » Wed Jun 20, 2012 1:18 pm

And I have a similar spell in my mod...but mine tosses you up in the air and then tosses you sideways using the PushActorAway with a negative value, towards your destination. Kind of the Monty Python flying spell:

What is your name? What is your quest? What...is your favorite color?

Aieeeeeeeee!

lol that's what my bud said I should call this mod. Since it's just a joke mod. He said, 'You should call this mod "Blue, No Yelloooo-aaaaaagh!""

Im calling it Leap Of Faith. I'll have it up in a few. So far it's pretty funny. My 'testers' are enjoying it.
User avatar
ONLY ME!!!!
 
Posts: 3479
Joined: Tue Aug 28, 2007 12:16 pm


Return to V - Skyrim