3 Scripting-Related Questions

Started by , Thu 13/10/2005 13:51:54

Previous topic - Next topic

SkinDog


Hello,

I am pretty new to AGS and I have a couple of queries, partly related to what I would like to do and partly just to help me understand the way in which AGS writing works and the constraints.

I was wondering if there is a way in the interactions script for an object  to influence the GUI - e.g. could 'Any Click on Object' have a script which would, say - change the Sprite for a button to the 'pressed' one or display a message in the GUI?

Secondly, I was wondering if there is a way, through scripting, or otherwise to have an interaction for an Object, which works in the same way as the 'Mouse Moves Over Hotspot' interaction, for a hotspot.

Finally I was wondering - Is it possible to run another, different script from within a script and pass - receive values between them?

Any enlightenment would be muchly appreciated!

Elliott Hird

#1
1: Yes, (checks manual) use btnName.NormalGraphic = sprite_number; and then of course switch it back afterwards.
2: in repeateadly_execute[sic?]:
Code: ags
if (Character.GetAtScreenXY(mouse.x, mouse.y) == cScriptName)
{
do stuff;
}

3: I'm not quite sure what you mean. Could you please clarify that?

Ishmael

For the third one, you can make your own functions - read the scripting tutorial in the manual - and make them take and return values.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Elliott Hird

Quote from: Ishmael on Thu 13/10/2005 15:46:44
For the third one, you can make your own functions - read the scripting tutorial in the manual - and make them take and return values.
I thought so too, but I just wanted to check.

SkinDog


Many Thanks All, I wasn't sure if you could influence buttons in this way from outside the GUI scripts and how you could pass information between scripts...
Gradually getting to understand it though..
Will have to read the manual a couple more times I think...

Elliott Hird

#5
Glad you're getting there.

Edited by Ashen: No need to quote whole post directly above yours.

SMF spam blocked by CleanTalk