Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Duckbutcher on Mon 30/01/2017 17:08:44

Title: nonblocking object animations and GUI relabelling questions
Post by: Duckbutcher on Mon 30/01/2017 17:08:44
Hi all, I`ve got back into AGS after a long break, and have to say the new version (I`m now using 3.4) is giving me brainaches that my trusty old 2.72 could only dream of.

So I`ve got two questions: how do I do nonblocking object animations, eg a fireplace or a flag waving in the wind? I set the object`s view before screen fadein then put the animation command in repeatedly execute, and the object animates but the cursor is gone and I can`t do anything.

Second question - changing the GUI labels. I`m using the default Lucasarts template which comes with 3.4 but it behaves quite differently to the old proskritos MI template I was used to. I want to put in my own simplified version of the gui where I basically combine push, pull open and close into one command called "move". I need to know how to change the label in the command line (and the colour too now I think of it) - can`t seem to find where to do this in the global script.

Thanks, hope you`re all well.


Title: Re: nonblocking object animations and GUI relabelling questions
Post by: Slasher on Mon 30/01/2017 17:19:20
I'll help with your first question.

Example:
Code (ags) Select

function room_Load()
{
oFire.SetView(42);
oFire.Animate(0, 4, eRepeat, eNoBlock);  // Must be eNoBlock else the Room won't Load!
}


You only need to run this once.
Title: Re: nonblocking object animations and GUI relabelling questions
Post by: Duckbutcher on Mon 30/01/2017 17:25:24
Sweet, thanks a lot. It`s been a while, it`s kind of like relearning how to ride a bike, it looks obvious in hindsight! Cheers. Anyone got any ideas regarding the GUI question?
Title: Re: nonblocking object animations and GUI relabelling questions
Post by: Cassiebsg on Mon 30/01/2017 17:50:31
Sorry, am not familiar with neither the LA's template, nor AGS 2.72...so I'll just try and guess. (roll)

Have you looked in the GUI's tree for the GUI you want? Open it, edit it, probably deleting the buttons (remember to delete/change them in the global scripts) add the new button called move, name it , go to the "events" (flash icon) and click the apropriate box, anyclick? something else?
Title: Re: nonblocking object animations and GUI relabelling questions
Post by: Duckbutcher on Mon 30/01/2017 18:07:40
Yeah that`s what I tried. Going into the global script on the older version with the MI template would have given me a chunk of script where I could relabel the displayed commands, and have for example, "Pick Up" replaced by "Steal" or something. I`ll clarify it`s literally just the command line where I need this, I`ll design my own sprites for the buttons with my own words on them later.

But yeah, clicking on the script in the properties panel for the various GUI buttons sends me to this:

////////////////////////////////////////////////////////////////////////////////////
// GUI handling
////////////////////////////////////////////////////////////////////////////////////

function Action_Click(GUIControl *control, MouseButton button) {
  Action tempbutton = getButtonAction(control.ID);
  SetAction(tempbutton);
}

Which doesn`t have an obvious way to change the word to be displayed in the command line.
Title: Re: nonblocking object animations and GUI relabelling questions
Post by: Khris on Mon 30/01/2017 19:35:16
Open the Main part of the Script called "guiscript", then look for the function TranslateAction(). It associates the actions with the ActionBar texts.
Title: Re: nonblocking object animations and GUI relabelling questions
Post by: Duckbutcher on Tue 31/01/2017 13:11:54
Khris that`s done it cheers. All problems solved. For now...!