Blink Spell

Post » Thu Jun 04, 2015 6:52 pm

So I'm trying to recreate the Blink spell from Dishonored (yes, I know there's a mod that does this already, but I want to learn how to script myself), and I keep getting an irritating error that I don't know how to solve. Basically, I'm modifying the defaultTeleport script that the Caller uses. I've trimmed off all the fat and am left with this:

scriptName BlinkSpell extends activeMagicEffect import gameimport utility activator property BlinkTargetAct autofloat property fSearchRadius = 1600.0 auto  ObjectReference teleportGoal ObjectReference playerRef  Event OnEffectStart(Actor akTarget, Actor akCaster)playerRef = game.getPlayer()endEVENT  Event Teleport()teleportGoal = FindRandomReferenceOfTypeFromRef(BlinkTargetAct, PlayerRef, fSearchRadius)playerRef.MoveTo(teleportGoal)EndEvent
And I keep landing with these errors:
BlinkSpell.psc(10,16): missing FUNCTION at 'teleportGoal'

BlinkSpell.psc(10,29): mismatched input '\\r\\n' expecting LPAREN
Any help would be super appreciated. I'm still new to all this.
Thanks!

User avatar
Emily Jeffs
 
Posts: 3335
Joined: Thu Nov 02, 2006 10:27 pm

Post » Thu Jun 04, 2015 8:53 pm

The first one means something with the function input 'teleportGoal' on line 16 isn't working. The second error means that it was expecting and additional ( on line 29.

You have your two ObjectReference properties declared incorrectly. Add the word property to the middle of both declarations, just like how you have it in there for your activator and float. See if that fixes all your errors.

User avatar
Valerie Marie
 
Posts: 3451
Joined: Wed Aug 15, 2007 10:29 am

Post » Thu Jun 04, 2015 3:13 pm


I think having them as variables was intentional.

If you do want them as properties, do what Alex said but also add the Auto flag to the end of each (after the name of the property).
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Thu Jun 04, 2015 10:11 am

I've never thought about doing it like that. Wouldn't placing an xMarker and then moving the player towards that be easier? I've never tried it but that's where I'd begin.

User avatar
Josh Lozier
 
Posts: 3490
Joined: Tue Nov 27, 2007 5:20 pm


Return to V - Skyrim