Making objects appear in other rooms?

Started by Tyr, Wed 02/12/2009 17:36:35

Previous topic - Next topic

Tyr

I've been stuck on this one for months and can't figure it out (well...i was stuck on it when I went away and now I'm back am still stuck on it...similar thing).
I've got two rooms. In one I want the character to press a button and then in a completely different room a object appears.
I can handle this for a object appearing in the same room but I just can't figure out hhow to do it for a seperate room. Do I have to go through ssome sort of setting a global variable to true and checking it?

Khris

Exactly. There's also a module called OtherRoom.
But if you're doing this only once or twice, just create a variable in the Global variables pane, type int or bool.
Set it, then check it in the other room's before fadein.

Tyr

Dang, thats what I was afraid of.
A module sounds interesting but...I've already done quite a lot, I don't want to have to start again.

DoorKnobHandle

Using a module does not mean you'll have to start over with anything! :D

Khris

Yes, a module is just a script (and header) that you can add to your game at any time, usually all it does is provide additional script functions; it won't interfere with your game at all.

Tyr

#5
Strange, I must have been using it wrong last time.
I tried to use a monkey island interface module and it was like starting a game from scratch wit hthis interface.
Anyway.
Got it working now, ta, much easier to just have room object on (i really don't get the way globals are handled in ags). Hopefully I can actually get something done now, so many problems in this old game of mine...

DoorKnobHandle

Well, it depends on the module. The Monkeys Island module simulates a different kind of GUI so that means you have to re-create that etc. so, yeah, it would be like starting over. Those are the kind of modules you want to pick before starting your game. Just like with your normal GUI. :D

But that's not true for all modules. The OtherRoom module for example doesn't touch your interfaces, characters etc. so you can add it in or take it away at any time. It just adds some functions/functionality that you wouldn't have without it in AGS, as Khris said. Note that I've never used it though.

Tyr

#7
Quote from: dkh on Thu 03/12/2009 17:52:52
Well, it depends on the module. The Monkeys Island module simulates a different kind of GUI so that means you have to re-create that etc. so, yeah, it would be like starting over. Those are the kind of modules you want to pick before starting your game. Just like with your normal GUI. :D

But that's not true for all modules. The OtherRoom module for example doesn't touch your interfaces, characters etc. so you can add it in or take it away at any time. It just adds some functions/functionality that you wouldn't have without it in AGS, as Khris said. Note that I've never used it though.

So you can't change GUIs later?
I'm ultimatly wanting to use a broken sword like GUI but right now am just with the default one. I was planning on working the game out before doing the gui.


edit- dang, have to drop ags again. I've ruined my game by experimenting with changing the resolution <__<

DoorKnobHandle

You can change GUI but if you're not just changing cosmetics (ie. how it looks) but also how it works (ie. what verb-actions you have etc.) it means you'll have to recode all your interactions for the player with objects, characters, hotspots etc.

Khris

You don't have to drop it. Your game should be fixable; I suspect you told AGS to resize all GUIs according to the change of resolution? It's a bit of work but nothing impossible.

However, it's a really bad idea to make the other stuff first, then the GUI.
Choose a resolution, decide on the GUI you want and its workings, THEN start doing rooms and puzzles.
E.g. a broken sword GUI shouldn't need more than look and interact, so in order to use one of the existing scripts/solutions from the forums you'd probably have to change a LOT of interactions/events.

The Monkey Island thing you tried was probably a template, not a module. Templates are indeed empty games that have the GUI and stuff already changed. So to use one, you do have to start over.
A module on the other hand can be added (and removed) at any time.

SMF spam blocked by CleanTalk