script won't save.

Post » Sat May 28, 2011 2:14 am

scn H52EWDTReductionPulseSCRIPTref Targetfloat fTimerBegin OnHit        Set Target to GetSelf	Target.AddPerk H52DTEWReductionPulse	Target.RemovePerk H52DTEWReductionPulseEnd


It gives no error message, but when I save and click exit, it does not save. I can't find it by hand or with the filter. Any clues?
User avatar
CYCO JO-NATE
 
Posts: 3431
Joined: Fri Sep 21, 2007 12:41 pm

Post » Fri May 27, 2011 6:36 pm

Hmmm, I dont see anything there that would make an error. All I can think of is maybe you typed the name of the perk in wrong or something? I tried it in the Fo3 geck commenting out the perk part and it saved no problems. Check the perks name? Thats all I could think it would be. :shrug:
User avatar
Honey Suckle
 
Posts: 3425
Joined: Wed Sep 27, 2006 4:22 pm

Post » Sat May 28, 2011 2:49 am

Hmmm, I dont see anything there that would make an error. All I can think of is maybe you typed the name of the perk in wrong or something? I tried it in the Fo3 geck commenting out the perk part and it saved no problems. Check the perks name? Thats all I could think it would be. :shrug:


I've directly copied it from the perk entry.

Thanks though.
User avatar
Cedric Pearson
 
Posts: 3487
Joined: Fri Sep 28, 2007 9:39 pm

Post » Sat May 28, 2011 5:32 am

Don't use http://geck.gamesas.com/index.php/GetSelf like that - it's completely unnecessary and, if it changes anything, all it's going to do is make your script less efficient and invite in a couple of problems. http://geck.gamesas.com/index.php/GetSelf should only ever be used if you're passing information out of a script or if you need to use its return value as a parameter in a function like http://geck.gamesas.com/index.php/PushActorAway.

Also, I'm assuming you're going to change the script to use your fTimer variable later, right? If not, then there's no reason to keep it there.

I don't see any structural problems in that script, and the functions and blocktypes are all spelled correctly, so the problem will be either a misspelled editorID or you've tried to use a variable name which is already taken as an editorID elsewhere. I think the former is more likely.

Cipscis
User avatar
djimi
 
Posts: 3519
Joined: Mon Oct 23, 2006 6:44 am

Post » Sat May 28, 2011 6:23 am

Don't use http://geck.gamesas.com/index.php/GetSelf like that - it's completely unnecessary and, if it changes anything, all it's going to do is make your script less efficient and invite in a couple of problems. http://geck.gamesas.com/index.php/GetSelf should only ever be used if you're passing information out of a script or if you need to use its return value as a parameter in a function like http://geck.gamesas.com/index.php/PushActorAway.

Also, I'm assuming you're going to change the script to use your fTimer variable later, right? If not, then there's no reason to keep it there.

I don't see any structural problems in that script, and the functions and blocktypes are all spelled correctly, so the problem will be either a misspelled editorID or you've tried to use a variable name which is already taken as an editorID elsewhere. I think the former is more likely.

Cipscis


What should I use then?

And I've checked three times, it is spelled correctly.
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Sat May 28, 2011 12:42 am

Try using this - http://www.newvegasnexus.com/downloads/file.php?id=36290

That should cause the GECK to give you some meaningful errors, instead of just refusing to save without giving you any information on what's wrong.

Cipscis
User avatar
Emma
 
Posts: 3287
Joined: Mon Aug 28, 2006 12:51 am

Post » Sat May 28, 2011 8:48 am

Try using this - http://www.newvegasnexus.com/downloads/file.php?id=36290

That should cause the GECK to give you some meaningful errors, instead of just refusing to save without giving you any information on what's wrong.

Cipscis


Thank you. Didn't know about that program. I'll report back :)
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Sat May 28, 2011 9:18 am

Don't use http://geck.gamesas.com/index.php/GetSelf like that - it's completely unnecessary and, if it changes anything, all it's going to do is make your script less efficient and invite in a couple of problems. http://geck.gamesas.com/index.php/GetSelf should only ever be used if you're passing information out of a script or if you need to use its return value as a parameter in a function like http://geck.gamesas.com/index.php/PushActorAway.

Also, I'm assuming you're going to change the script to use your fTimer variable later, right? If not, then there's no reason to keep it there.

I don't see any structural problems in that script, and the functions and blocktypes are all spelled correctly, so the problem will be either a misspelled editorID or you've tried to use a variable name which is already taken as an editorID elsewhere. I think the former is more likely.

Cipscis


The variable name Target is already in use as an EditorID Cipscis! Apparently I have a luck of 1 :P

Anyway, about GetSelf. I am trying to attach a perk to the NPC that I shoot with the scripted weapon. Any idea how to achieve that without GetSelf?
User avatar
Hella Beast
 
Posts: 3434
Joined: Mon Jul 16, 2007 2:50 am

Post » Sat May 28, 2011 5:52 am

Just call the functions that you want to call on the scripted reference implicitly. If you're using a weapon to run a script on an actor, then you'll want to use an effect script to do it:
Begin ScriptEffectStart	AddPerk H52DTEWReductionPulseEnd

http://geck.gamesas.com/index.php/GetSelf isn't at all useful in this situation. The following two scripts will, under ideal conditions, do exactly the same thing:
ref rSelfBegin ScriptEffectStart	set rSelf to GetSelf	rSelf.AddPerk H52DTEWReductionPulseEnd
Begin ScriptEffectStart	rSelf.AddPerk H52DTEWReductionPulseEnd

Cipscis
User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am


Return to Fallout: New Vegas