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

#2521
In the room you want this to happen in, go to the 'Settings' window. Click the 'Interactions' button (looks like a red 'i'), or press Ctrl-I. This gives you a list of options, the ones you want for strazer's code are Player enters room (before fadein) and Player enters room (after fadein).
Click one of them, add a 'Run script' command, and press the 'Edit script' button.

Once you've created the 'Run script' commands, you can edit them either by the 'Interaction' list, or by opening the Room Script (the '{}' button, or Ctrl-E).
#2522
OK, so SSH posted while I was typing this, but here's how to use it:

Rather than creating another function, you could create a variable to store the previous direction or use a global int, as khrismuc suggested, but use dialog_request to change it back.
So, using your example:

using interaction editor:
character-movechar (EGO,200,180,true)
Run script
character -face location(EGO,180,180)
character -face location(elf,200,180)
game run dialog(0)

Then, the 'run script' should be something like:
Code: ags

SetGlobalInt (1, character[EGO].loop); // Sets GlobalInt 1 based on direction EGO is facing.


And your dialog_request would be:
Code: ags

function dialog_request (int param) {
  if (param == 1) {
    // Change faceing direction, based on GlobalInt 1
    if (GetGlobalInt(1) == 0) FaceLocation (EGO, player.x, player.y + 50);
    if (GetGlobalInt(1) == 1) FaceLocation (EGO, player.x - 50, player.y);
    if (GetGlobalInt(1) == 2) FaceLocation (EGO, player.x + 50, player.y);
    if (GetGlobalInt(1) == 3) FaceLocation (EGO, player.x, player.y - 50);
    Wait (1);
  }
}


And add 'run-script 1' to the end of your dialogues, e.g.
@4  // option 2 - Goodbye.
elf: Yeah, see you.
run-script 1
stop
#2523
The short way, for 2.62:
Open up the Global Script, and find the on_mouse_click function. (Clicking it in the 'Script' drop-down menu will take you right there.) It should look something like:
Code: ags

function on_mouse_click(int button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button==LEFT) {
    ProcessClick(mouse.x, mouse.y, GetCursorMode() );
  }
  else {   // right-click, so cycle cursor
    SetNextCursorMode();
  }
}

Change it to:
Code: ags

function on_mouse_click(int button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button==LEFT) {
    ProcessClick(mouse.x, mouse.y, MODE_WALK); // Left click = walk to
  }
  else {   // right-click, so cycle cursor
    ProcessClick(mouse.x, mouse.y, GetCursorMode()); //Right click = run interaction
    // if you only use one interaction mode, you could change this to ProcessClick(mouse.x, mouse.y, MODE_USE);, or whatever mode you're using
  }
}


You might need a way to change cursor modes, of course, but I assume you've taken care of that. Also, you won't need to have 'Walk To' as a cursor mode, 'cause that could get confusing.
#2524
You'll have to use SetTalkingColor (CHARID, int newcolor) to change the colour, then use it again afterwards to set it back to the orinial colour. 'newcolor' is the palette index of the colour, just like you set it on the 'Character' window, so something like:
Code: ags

//Suppose EGO's normal speech colour is Blue (slot 1)
DisplaySpeech (EGO, "I think I'm ready. How about you, Backpack Hamster?";
SetTalkingColor (EGO, 12); // Set colour to Red
DisplaySpeech (EGO, "Ready to roll.";
SetTalkingColor (EGO, 1); // Back to Blue
DisplaySpeech (EGO, "And you, Aliens from the Planet X?";
SetTalkingColor (EGO, 10); // Set colour to Green
DisplaySpeech (EGO, "Just go, already!";
SetTalkingColor (EGO, 1); // Back to Blue
DisplaySpeech (EGO, "Alrighty, then. Let's go!";

NITE: If you're using 2.7, it's character.SpeechColor you want, e.g. character[EGO].SpeechColor = 12; will set it to Red.


To simplify it further, you could create a function that takes care of the colour changes for you. That might only be worth doing if you intend to use the other colours a lot, though.
#2525
I've downloaded it, but haven't had much of a chance to play it yet.
I think this is the thread Mills was talking about.
#2526
General Discussion / Re: Goblins 3
Wed 06/04/2005 13:32:00
Here, maybe?

And, I doubt there is an XP version, with the age of the game.
#2527
Oddly, I can only get those magic eye/autostereogram things to work if I look at it on a computer screen. I only found that out about 3-4 months ago as well.
I think there was some mention of using optical illusions in games before - possibly in a GTD? Possibly I just imagined it, though.
#2528
I'm with Zor on the gradients (door, sign, cardboard box), also the textures on the walls. The door does look a little big, but aren't fire exits meant to be easy to use? (And, it would be Exit, unless, like Don'tTreadOnMe said, it's a joke.)

Another thing is the tree. I like it a lot, but it's kinda blurry/fuzzy, which doesn't really fit with the sharp outlines in the rest of the image. Also, it'll make walkbehinds a right pain to do.

I'm not really getting the hotel vibe from it. If I hadn't read that, I'd have guessed it was the back of a school gym, or something. Don't know what to do about that, though. Maybe put a sign on the door, with the name on it?
#2529
No, global variables aren't the same as those you set in the interaction editor. To use those in scripting, you need to use GetGraphicalVariable (variable) and SetGraphiclaVariable(Variable, amount)
E.g.:
Code: ags

if (GetGraphicalVariable ("my variable") == 1) { // Don't forget the " " around the name
  SetGraphicalVariable ("my other variable", 3);
}

(Look them up in the manual for more details)
#2530
No, you should be able to use that to disable hotspots.
I think the problem is Hotspot 0, which is usually the 'empty' parts of the screen. Since 'which' starts at 0, it tries to deactivate a non-existent (or invalid, hence the error) hotspot.
Try setting 'which' to 1 to start with (you may have to change it to if (which<= 8) as well), or increasing 'which (which ++;) before calling Enable/DisableHotspot(which);.

Also, ints can be set when you declare them, so:
Code: ags

int which = 1;

would do the same as:
Code: ags

int which;
which = 1;

(ints are 0 by default, so you don't need to include the '= 0')
#2531
AGS Games in Production / Re: Hero Theorem
Tue 05/04/2005 17:17:16
I also think it's "policeman" not "police man".
Also, it'd be "the 17 year old Edward J. Wright", and (I think) it should be "the connection of their fates will lead them" or "leads them". Little things, and I only mention them because a) I'm a pedant, and b) these are the only things I can see that aren't totally awesome.

Finish this. Or I'll think mean things about you.

EDIT: Pah! Make a pedantic post, and arse up the italics. Just my luck.
And, I quite like the green tint, I'd thought it was a deliberate 'style' you were going for.
#2532
quintaros beat me to it, but:
I Google-d the phrase "translate joystick movements to keyboard key", and came up with a couple of results, of which this one (via Tucows.com) was most immediately promising. Most of the others look like pay programs, or even hardware.
#2533
No, I've not made a game yet. I just sort of potter about with scripting, picking things up here and there. I have played with passwords and such, but there's so many different ways of doing it, that it might not be of any use.

Anyway, I've had a look a 7DAS, and I'd got the wrong idea in my head about what you wanted - I was thinking of something much more complicated and graphics based. You're probably better ignoring my suggestion about InputBox, as it really doesn't fit, and using a stripped-down version the Text Parser interface. There's a template on this page if you don't know how it works, and you can look in the manual and on the forums for more details.
#2534
I did... but it was a while ago.
Excellent! Now I have an excuse to re-play it.
#2535
You need to put your password on the StrComp("password", input) line, where it says "password".
Like, if the password was "ashen", it'd be something like:
Code: ags

string input; // declare string
InputBox("Enter Password:", input); // Ask user for password
if (StrComp ("ashen", input == 0) { // replace ashen with whatever you want
  // If the password was correct.
  // The 'Go to computer screen code would go here.
  // It could be a  NewRoom (x) command, or GUIOn(COMPGUI)
}
else {// if the password was wrong
  Display ("Access Denied!");
}


If you want, PM me with details of what exactly you want, and I'll throw together a template for you later today. It might be easier to show how it works, than to try to explain it.
#2536
Quotei think the hardest thing is drawing ability
I know that feeling.....
But, yeah, you've got it. There's no special program, like [...] said, just AGS and your favourite paint program.
#2537
Don't ask for much, do you?

For the password screen you could either use the InputBox() command, or create a GUI with a text box on it, if you want to control the exact look, and use GetTextBoxText().
Then StrComp() or StrCaseComp() to check if the password is right.
For the computer screen, you could either use a room, with hotspots and so on, or a GUI. I've not played GK3 (well, i have, but only the very start), so I don't know what you're aiming for.
It's not really possible to give you the exact scripting needed, without knowing in detail what you want to achieve - especially if it'll involve settign up GUIs.

You might also want to read through the GUI section of the manual, and search the forums, to get a better idea of how to do it yourself.
#2538
Dang, beaten to the punch.  I'll just add....
If you'd searched a little more, you might've  found this thread from a while ago asking the same thing, and I'm sure there've been more.
#2539
Hints & Tips / Re: Novo what pillow?
Mon 04/04/2005 10:37:16
Novo Mestro, I'd guess.

The search function is your friend - I found this thread that looks like the same question as yours.
#2540
What goes from green to red at the touch of a button?


(I wish I could say it was better in my head, but it was piss poor there as well.)
SMF spam blocked by CleanTalk