Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - AdamM

#81
AGS gives you default messages when you start making a new game - "Damn, I'm looking good", as Ashen said, is default for looking at yourself, but other objects, or hotspots, do not have these messages because you have to add them yourself.

It sounds like you've created two rooms but haven't got a way to travel between them. If you start in the first room, and want to move to the second room to test it, then you need to have a door, or a teleport, or something that will allow you to move to the next room.

The easiest way to do this is to make it so once the player walks past the edge of the screen, it changes to another room. This is partly covered in the Tutorial Part 3 at the bottom of the page, 'Edges', where you can learn how to go to a different room when your character walks past the edge of it.

If you've set the edges of the room (the yellow lines), then go to the 'Settings' tab for the room and click the button for the Interaction Editor. If you want to set the room to change when you walk off the edge, you will see this function as "Player - Go to a different room". Assuming your rooms are numbered 0 and 1, change the value "New room number" to 1, and then when you next walkover the yellow lines, you will be moved to the second room.
#82
The walk is part of a script, so if I switch the walk to eNoBlock, it immediately carries on before the character has reached his destination. Why, is there a way to check it before continuing with the script? if IsWalking==1... do what?
#83
That sir is genius! Thank you!

...just in case, though, is there a way I can get my region script to run simultaneously without using repeatedly_execute_always?
#84
I have a room where interacting with an object starts a script. The beginning of the script involves moving the player character over to the object. While doing so he passes over one or more regions. The regions are scripted to make things happen when the player passes over them. However, because the first interaction script is already running, the region script gets blocked and is only run once the interaction script is finished. This is not ideal, as the region script is meant to be run whenever the player passes over them. That said, I can live with the script not being run in this particular instance, as long as it is not run at the end of the interaction script.

So, what I'm looking for is either:
1) A way to tell the region script that the interaction script is running and it should therefore not run, or
2) Some kind of special function which I can place in my interaction script that can 'flush' the script threads and discard all queued-up blocked actions, thus preventing the region script from running.

(By the way, I hate repeatedly_execute and his sister _always with a passion, as I think this is the way out for the coward willing to accept a workaround. I'm not one of these.)

Thanks in advance!
#85
I'm having trouble understanding these as well. Set/GetGlobalInt seem to work fine, but the manual implies that export/importing ints means you can only take ints from global to room scripts; not the other way around?
#86
I got into the CHM, and it does indeed say StrCopy is now String.Copy, or in fact just two strings seperated by =. Go figure. Does a code update always necessarily have to break everything that went before in order to work?Ã, Grr. :)
#87
Hey, that worked! Why though? Is StrCopy obsolete? I can't access the help file for some reason, so I can't find out if that's the case.
#88
When I was building my game in 2.70, I had a script (which I think I nicked off someone else on these forums but can't remember who) in the first room (the splash screen) that triggered an InputBox asking for the player's name. This would then be stored in buffer, StrCat'd a surname onto it, and then StrCopy'd to character[EGO].name.

The player character's name is simply that, 'character[EGO].name', so that it can be used in things like looking at oneself:

Code: ags
Display("That's me, %s.", character[EGO].name);


I upgraded to 2.72 so that I could use a module that required it. Upon trying to compile I was told that "'name' is not a public member of 'character'" and suggested I capitalise it. Grumbling, I did, and upon compiling found the error message had changed to:

Type mismatch: cannot convert 'String*' to 'string'

It references the line that says:

Code: ags
StrCopy(character[EGO].Name, buffer);


Now this completely baffles me, and nothing I try will fix it... help!
#89


Brilliant game, despite the obvious plagiarism.Ã,  ;)
#90
Quote from: KhrisMUC on Tue 06/02/2007 11:37:30
For the record, all music files should be in the Music folder (not the project folder).
Well I apologise for my misinformation then. I still use 2.70.
#91
How Bizarre (By OMC).

For the record, all music/sound files should be in the project folder (not the AGS folder or the Compiled folder). MIDI files should be named MUSIC0.mid, MUSIC1.mid, etc. You then call those files in your game by scripting the function PlayMusic(int), where int is the number of music file you want to play (0, 1, etc.).

Also bear in mind that AGS searches for MP3s first, and then MIDIs second. If you are naming your files based on file type seperately, such as having a MUSIC1.mp3 and a MUSIC1.mid, the MUSIC1.mid will never be played. You must give each file a seperate number.

You say you've done all this?
#92
Aha, I didn't notice that. Thanks, I'll paste the code before it.

Er, what do you mean "cleaned up the code", KhrisMUC? Doesn't look like you've changed anything to me.

Ashen, I thought my GUI was a popup modal one (and I actually expected you to say that, because I searched the forums and you've said that before in response to GUI and PauseGame queries :)). But the thing is the game didn't pause when I pressed Escape - I could still see the character.[EGO] idle animations running in the background. When I stuck PauseGame in there, they stopped.
#93
So I've scripted so that when a player presses Escape, it calls PauseGame and brings up a menu GUI (IF the menu GUI isn't visible in the first place, which means if it is the Escape key will hide it and call UnPauseGame).

This all looks fine and dandy on paper, but as soon as I stuck PauseGame and UnPauseGame into my script, the Escape key doesn't get rid of the GUI. Why is this? PauseGame shouldn't stop on_key_press, should it? Is it something to do with the button animation I'm running in the GUI at the same time?

Code: ags
Ã,  if (keycode==27)
 {
if (gMenu.Visible==true) 
{
gMenu.Visible=false; UnPauseGame();
} 
else {
gMenu.Visible=true; PauseGame(); Animation.Animate(25, 0, 10, eRepeat);
}
}
#94
I obviously wasn't searching for the right thing.  :-\

Cheers!
#95
Hi guys. Here's an easy one. How do you set hotspots etc. to display a default message when the player clicks on them (e.g. if the player has their cursor set to Talk To, and clicks on an inanimate object, the game displays 'You can't talk to that' or similar)? I can't seem to find an contextual answer in the manual or by searching. Thanks in advance.
SMF spam blocked by CleanTalk