Script has no effect to the Game!!? [SOLVED]

Started by Digital Mosaic Games, Sun 27/03/2011 12:58:19

Previous topic - Next topic

Digital Mosaic Games

Hey guys,

I'm using AGS 2.3.1(springedition).
When I change something in my GlobalScript there are in fact the changes I want in the game. There it works! But when I change something in my rooms it doesn't work! It stays like it was before I changed it. I even deleted the whole script of a room and it still worked as it was before! Also when I write shit in the script, there are no errors. That's sooo strange!!

Is there somebody who could help me or had a similar problem before???

Thanks!

Moresco

It's not your fault...this got me for a while too.  I thought that since I knew the function names I could just type them in and they would automatically link, but this isn't so.  It really should be, but it's not.  You have to go into the room in question, click the Lightning bolt icon to bring up the Event panel and then link the scripts.  It will just link them if you already have them typed up, so no worries there..but you MUST click it and the "..." icon to get them linked.

And yes, it's in the manual, but I'm not sure where as I had to search to find it, and searching Event Pane brought up very little in the Index, but if you go to Search and type it in you get a list of various things...all useless except for "repeatedly_execute (_always)".

Click on that and it gives you an explanation on the difference between a script placed in global and room scripts, and why and how they differ.  But yeah...so the manual needs a lot of work, in my opinion.  I took a break from AGS, came back after a year or so and found this stumped me, yet again!
::: Mastodon :::

Khris

Moresco, I don't think that's the problem here.
NEON-GAMES said he wrote shit and the compiler didn't complain i.e. somehow the script changes are ignored by AGS. I remember someone else having the same problem and there should be a thread about it already.
I think the best is to restore Game.agf using the backup file.

NEON-GAMES:
Move Game.agf somewhere else, then rename Game.agf.bak to Game.agf. (While the game isn't loaded in the editor.)

monkey0506

You may also want to try the "Rebuild All Files" option and see what difference that may make.

Digital Mosaic Games

Thanks All! But especially you monkey_05_06. It worked it detected all the before unrealized changes and errors.
Now it works fine! I hope this will stay like this!  :)

monkey0506

Glad to hear you got it sorted out. :) Very, very occasionally I have encountered the problem of changes to a room script not forcing the room itself to be rebuilt (even if the room itself is specifically saved (via "Save Room")). Unfortunately (or fortunately?) it's not really reproducible since I've no idea why this very rarely occasionally occurs, so I've never really had enough information to justify formally reporting it as a bug. Rebuilding all game files has always served as a fix for me though, as it seems to have done for you too.

SMF spam blocked by CleanTalk