Easy question on running scripts in dialogs.

Started by markbilly, Sat 28/03/2009 10:55:41

Previous topic - Next topic

markbilly

I've been using AGS 2.72 for ages and recently moved to 3. Just getting used to all the changes, dialog stuff being one of them...

You can now put scripts directly in the dialog, which is great, but I have a problem. Doing things like moving the player character, etc are fine, but what happens if you want an object to do something? Because, clearly an object is a room thing, and the dialog is global?

Do you have to resort back to the AGS 2 method of running scripts in a dialog? If so, how do you do it in AGS 3?

Thanks

P.S. Sorry if this has been answered before, or is in the manual. I have looked :/
 

Khris

You have to use the object array, just like in the global script.
 // show object 2 in room 3
 if (player.Room == 3) object[2].Visible = true;

markbilly

 

Trent R

Related, there is also the on_call/CallRoomScript function. For readability, you can through in an enum.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

SMF spam blocked by CleanTalk