Keyword.SendStoryEvent not passing integer parameters?

Post » Wed Jun 20, 2012 8:18 pm

According to the wiki http://www.creationkit.com/SendStoryEvent_-_Keywordtakes a location, two object refs and two ints, all optional. These are supposed to be passed to the quest that fires in response to the event.

So: I'm doing this:

EVENT onActivate (objectReference triggerRef)	Debug.Trace(self + ": onActivate Called - starting quest " + QuestKeyword);	send_story()EndEventFunction send_story()	Debug.Trace(self + ": send_story Called - starting quest " + QuestKeyword);	actor pc = GetPlayer();	Location locn = pc.GetCurrentLocation()		;	; send the quest Event	; -1 as the first int parameter means "use the default info" - i.e. the "cow for sale" blurb	;	QuestKeyword.SendStoryEvent(akLoc = locn, akRef1 = guard, akRef2 = None, aiValue1 = -1, aiValue2 = 0);	;	; now let's record the result of that	;	SSG_Question_Script q = QuestProp as SSG_Question_Script;	;MessageBox("q.yes = " + q.get_choice())	Debug.Trace(self + ": sendStory done " + q.get_choice());EndFunction

In particular, I'm passing -1 as the first integer value:

	QuestKeyword.SendStoryEvent(akLoc = locn, akRef1 = guard, akRef2 = None, aiValue1 = -1, aiValue2 = 0);

So you'd expect -1 to be the value in aiValue1 in the radiant quest's http://www.creationkit.com/OnStoryScript_-_Questevent? Right?

To check that, I'm doing this in the script in question:

Event OnStoryScript( \	Keyword akKeyword, Location akLocation, ObjectReference akRef1, ObjectReference akRef2, int aiValue1, int aiValue2 \)	speaker = akref1 as Actor	chosen = false	iv1 = aiValue1	iv2 = aiValue2	trace("SSG_Question_Script: script started by story manager: " + iv1 + "," + iv2)	SetStage(10)EndEvent

So I ran that from a clean save. What I get in the log file is this:

[04/01/2012 - 01:13:15PM] [SSG_TestButtonScript < (0200B320)>]: onActivate Called - starting quest [Keyword ]
[04/01/2012 - 01:13:15PM] [SSG_TestButtonScript < (0200B320)>]: send_story Called - starting quest [Keyword ]
[04/01/2012 - 01:13:15PM] SSG_Question_Script: script started by story manager: 0,0

So am I missing something basic here? Did I make a fundamental error? Or is it just that nothing in the CK works the way it is documented to work?

[edit]

Never mind. It doesn't like negative numbers ... I don't suppose anyone knows any more productive hobbies? I' feeling rather disillusioned with this one.
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Wed Jun 20, 2012 2:54 pm

Never mind. It doesn't like negative numbers ... I don't suppose anyone knows any more productive hobbies? I' feeling rather disillusioned with this one.
I edited the CK wiki to reflect this.
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Wed Jun 20, 2012 3:45 pm

Thanks. That'll save the next guy some headaches, at least.

I guess I'm about at the point where I ought to start adding bits to the wiki myself.
User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am


Return to V - Skyrim