Another Code Problem.

Post » Tue Jun 19, 2012 11:01 pm

You can bypass the whole issue like this:

Scriptname MOD1DragonCultistScript extends ActorEvent OnLoad ()  if (MOD1QPart1.GetStage() != 29)	Self.disable()  else	Self.Enable()	While (MOD1QPart1.GetStage() == 29) ; We know it's working here.	   ;self.say()	   Debug.SendAnimationEvent(Self, "IdlePray")	   Debug.MessageBox("OnUpdate Event Done:SendAnimationEventSent");	   Utility.Wait(1.0)	EndWhile  endifEndEventEvent OnInit()	;registerForUpdate(1)endEventQuest Property MOD1QPart1  Auto


But that still doesn't explain the bad return value from the quest...it's still an issue.

Yea.. I should do some loop reading. Familiar with them in other languages, but the syntax here is slightly different.

EDIT: Trying this... will post results
User avatar
Justin Hankins
 
Posts: 3348
Joined: Fri Oct 26, 2007 12:36 pm

Post » Wed Jun 20, 2012 12:37 am

I could have sworn properties needed to be declared at the start of the script, before your events and after the scriptname line


Nope. Papyrus doesn't care. Kind of like the Honey Badger...
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

Post » Tue Jun 19, 2012 3:23 pm

The Results are in: Redwood. It spammed the hell out of me with
"OnUpdate Event Done:SendAnimationEventSent", but it worked.



Still have no clue why my code didn't work though.
User avatar
Harinder Ghag
 
Posts: 3405
Joined: Wed Jan 17, 2007 11:26 am

Post » Tue Jun 19, 2012 9:23 pm

There's also the possibility of a compiler-bug: previous games showed some weird behavior in if...elseif...else blocks. It usually was related to a mix of spaces and tabs in code formatting.


As for declarations:
http://www.creationkit.com/Variable_Reference

So IMO it's a good idea to always define them before use to avoid confusion.
User avatar
Victoria Vasileva
 
Posts: 3340
Joined: Sat Jul 29, 2006 5:42 pm

Post » Tue Jun 19, 2012 11:34 pm

There's also the possibility of a compiler-bug: previous games showed some weird behavior in if...elseif...else blocks. It usually was related to a mix of spaces and tabs in code formatting.


As for declarations:
http://www.creationkit.com/Variable_Reference

So IMO it's a good idea to always define them before use to avoid confusion.

Well then I will make a habit of it. Main reason I started putting mine at the bottom is because that's where the engine automatically puts them when you declare them via the visual "Properties" button.
User avatar
natalie mccormick
 
Posts: 3415
Joined: Fri Aug 18, 2006 8:36 am

Previous

Return to V - Skyrim