xAgeSDLIntChange / responder

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: xAgeSDLIntChange / responder

Postby dendwaler » Wed Apr 03, 2013 11:15 pm

I want my animations to respond to play to a certain stage, but starting at whatever position they were in, so I can't use loopstart loopend.


That is exactly what i also need in my age.
I have been trying to do this since about a year and never succeeded, but i am a noob in programming.
In a puzzle i need an object to move to its next position after you entered a successfull combination.
After a false combination it should reset to the beginning of the animation.
I am very interested to hear the solution when you succeed in it.!
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: xAgeSDLIntChange / responder

Postby diafero » Thu Apr 04, 2013 3:29 am

Is this decrement bug also affecting Uru:CC? If yes, I could easily incorporate the fix into a new version of the Offline KI.
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: xAgeSDLIntChange / responder

Postby Render » Thu Apr 04, 2013 3:43 am

Thanks all for the reply.
@ Branan, I will do a pull request (if I can find out how :shock: )
@ D'Lanor, I think I figured out how to use the loopstart-loopend combination so it works as I know where to goto, so i can fiugre out where to start.
@ Dendwaler, I will let you know when i have a solution.
@ Diafero, I don't know to be honest, I am just trying to incorporate the python in my offline age and stubled upon the bug.
Let me know if you still want me to do a pull request.

One more question, for the coders amongst us.

What peace of python do i need to prevent an XAgeSDLIntRespList from responding?
I already have a special SDL variable I can use for this, what i need is a peace of code that will read the SDL state and do a check against a variable i can define within the alcscript, something like:

If ButtonSDL != buttonvar, stop else execute.

I gues I would have to put an extra variable line at the top of the original python script called buttonvar and then have the line above (also need to have the pythonfile read it from the SDL file)
I assume this is not to hard is it?
User avatar
Render
 
Posts: 55
Joined: Thu Jul 28, 2011 7:37 am

Re: xAgeSDLIntChange / responder

Postby Render » Thu Apr 04, 2013 4:55 am

Solved the responder question!
For however is interested, I used the (unused) hint line in the IntChange as a tag and added the following to the IntRespList:
stringTag = ptAttribString(7, 'Button number') at the top of the python just beneath the 6th argument

and:

if (tag != stringTag.value):
return
just after the OnSDLNotify line

In my alcscript I have added an extra type: string with value (buttonnumber) in the IntRespList

This seems to do exactly what i intended, namely only run the IntRespList command on the appropriate button.
User avatar
Render
 
Posts: 55
Joined: Thu Jul 28, 2011 7:37 am

Re: xAgeSDLIntChange / responder

Postby D'Lanor » Thu Apr 04, 2013 8:31 am

diafero wrote:Is this decrement bug also affecting Uru:CC? If yes, I could easily incorporate the fix into a new version of the Offline KI.

Yes, it is.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron