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 - strazer

#2181
Looks ok at first glance.
I'm more interested in what is before and after the function and the import line.
There's obviously some conflicting line of code somewhere.
#2182
Hm, I'm not able to replicate your error message.
Can you post or pm the global script and script header for me to take a look?
#2183
Strange, this works for me:

Global script

function displayline (int button) {
Display("test");
}

Script header

import function displayline (int button);

Make sure you don't have variables or defines named "displayline" or multiple declarations of the function or the import line.
#2184
The object animation has to be blocking, so it waits for the animation to finish before executing the next command.
I think the
Object - Start object animating
command is non-blocking, thus it starts the animation and immediately runs the next command (going to new room).

Remove the last 2 commands, put a "Run script" command there instead and script:

AnimateObjectEx(3, 0, 5, 0, 0, 1); // animate object blocking
NewRoomEx(5, 0, 0);
#2185
And you have removed all
#import displayline (int button)
#define displayline
#define displayline (button)
#define displayline (int button)
?
Does the error message refer to line 33 in the global script or the script header?
#2186
Put the function in the global script, not the script header.
#2187
Just do
import function displayline (int button);
#2188
I would probably do it like this:

Dialog script

@1
ego: Tell me something!
man: Ok. Here goes:
run-script 77
return

Global script
function dialog_request(int parameter) {
 if (parameter == 77) { // run-script 77 used
  int ran=Random(3);
  if (ran == 0) DisplaySpeech(MAN, "This is random message 1");
  else if (ran == 1) DisplaySpeech(MAN, "This is random message 2");
  else if (ran == 2) DisplaySpeech(MAN, "This is random message 3");
 }
 //else if (parameter == 44) { // run-script 44 used
 // //other stuff
 //}
}
#2189
You're welcome. :)

Yes, if you use the SetObjectPosition function in "Player enters screen (before fadein)", you won't see any "jitter".
#2190
Code: ags

character[GetGlobalInt(25)].room=character[0].room
character[GetGlobalInt(25)].x=character[0].x
character[GetGlobalInt(25)].y=character[0].y


Are the semicolons missing in your script as well?
#2191
It should be

GetGlobalInt(10);
if (GetGlobalInt(10) == 0) {
DisplaySpeech(DARREN,"J");
}
else {
DisplaySpeech(DARREN,"K");
}

But as I see it, you don't even need to set a variable.
You could check which room the player was in before:

if (character[DARREN].prevroom == BOTTOMROOMNUMBERHERE) {
DisplaySpeech(DARREN,"J");
}
else {
DisplaySpeech(DARREN,"K");
}

And why do you need two lift objects in the middle room? Couldn't you just use a single object and move it to the appropriate starting position when the room is loaded?
#2192
Forgive my ignorance, but doesn't this work?

I don't know which version of AGS it was made with, but here are some download links:
ags_215_sr3.zip
ags_221.zip
ags_231.zip
ags_255.zip
ags_256d.zip
#2193
Is there a reason why you don't want to use the
FadeOut (int speed)
function?
#2194
If you delete or rename the Compiled folder, it will be created again when you save/test the game, including the winsetup.exe, at least for me.
#2195
Last time I checked, yes.
I agree it's not very intuitive, but I think if it was easy to do CJ would already have changed it, so I guess it has to do with the way AGS works internally.
Deal with it. ;)
#2196
You're welcome. :)

I suspect it didn't work because "Run script" commands are always executed last in the interaction editor list, so the execution order was actually

-- Game - Display a message (11)
-- Game - Run dialog (17)
-- Run script [No 1, See below]
-- Run script [No 2, See below]

Thus, the dialog did run before the background was changed.
Anyway, I'm glad it works now.
#2197
Try this:

Code: ags

Look at hotspot
- Game - Display a message (0)
- (?) Conditional - If the player has inventory item (11)
-- Run script [No 1, See below]
-- Run script [No 2, See below]


Script no 1:

Code: ags

  // script for hotspot1: Look at hotspot
SetBackgroundFrame(1);
Wait(20);   
DisplayMessage(11);
RunDialog(17);


Script no 2:

Code: ags

  // script for hotspot1: Look at hotspot
SetBackgroundFrame(0); 
Wait(20);
#2198
QuoteI tried it out and the %2d doesn't work in AGS

Quote from: Scorpiorus
DisplaySpeech(JACK, "The new code is %04d", GetGlobalInt(99));
(...) will add leading zeros (up to 4) if necessary.

Try
  StrFormat (time, "%02d:%02d", hour, minute);
#2199
Try
RestartGame();
instead?
#2200
You can run Windows compiled games in DOS as well: http://www.adventuregamestudio.co.uk/kbview.php?id=5

Keep in mind that games depending on plugins won't work.

You may also need this: http://clio.rice.edu/cwsdpmi/
SMF spam blocked by CleanTalk