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

#781
Quote from: Revan (via pm)
I'm still having difficulty in being able to change the playable charactor... I want to start off as one guy (KRAS) and on the click of a hotspot (HOTSPOT) change playability to another guy (RHONIN) please can you help me...

To make KRAS the player character by default, check his "This is the player character" checkbox in the Characters pane.

Making RHONIN the player character when clicking on a hotspot:

- Select "Room Editor" from the left side
- Load room (double-click) the hotspot is in
- Select "Areas" from left side
- Select "Hotspots" from drop-down above
- Select/draw the appropriate hotspot
- Click "Interaction..." button
- Right-click "Interact hotspot" (or "Look at" or whatever fits)
- "New action..."
- Select "Run script" from the drop-down
- Click "Edit script..." button
- cRhonin.SetAsPlayer();
- Close, Save, Yes, OK etc.
#782
Glad to hear it.
It seems AddInventory and LoseInventory commands are indeed delayed-response functions, meaning they don't execute immediately but rather when the current script ends.

Btw, you can also use this workaround if you want to do stuff after a dialog has ended, because RunDialog is also a delayed-response function.
#783
You can add several "Run Script" actions for the same interaction. Try adding another "Run Script" action and put the Display command in there.
#785
AGS Beginners FAQ

AGS v2.7+:

To change the player character to ROGER:
Code: ags

  cRoger.SetAsPlayer();


To let the player character say something depending on who he is:

Code: ags

  // script for interaction: Look at couch

  if (player == cRoger) {
    cRoger.Say("Roger, you idiot, that's a couch!");
  }
  else if (player == cIdiot) {
    cIdiot.Say("That's a...uh...buffalo. Yeah...! That's the ticket!");
  }
  // ...more characters
  else player.Say("That's a couch.");
#787
Quote from: sloppy on Mon 14/11/2005 14:24:29I still don't know why it wouldn't work the other way

Did you create the room's rep_ex function using the interaction editor? Putting a "repeatedly_execute" function directly into the room script doesn't work at the moment.
#788
It should work with characters, hotspots and objects. "Hotspot" was just used as a term to describe all of these.
#789
Wow, did you actually manage to compile that? :o ;)
Next time, try saving your game first before exporting the module. :P

Now, looking back at my comments above, I think they don't really apply in this case.
I didn't really look at what your function actually does. Since it's such specialized code, with the animation and such, I think making a full-fledged module out of it isn't very practical. The Credits module is probably enough for most people.

Quote from: Kinoko on Sat 12/11/2005 06:55:04The biggest problem is that I still don't know exactly what I should physically change all the "gTownName" instances to.

I think it isn't necessary to make the GUIs parameters after all...

Anyway, for the rewritten module below, you need to set up:

- A GUI named "FADENAME" (gFadename) with a single label on it
- A GUI named "FADENAMEBORDER" (gFadenameborder) with a single button on it
- A view named "FADENAMEVIEW" containing the animation for the fadein in loop 0 and the animation for the fadeout in loop 1

Import the module, then you can do
Code: ags

  // script for interaction: Player enters room (after fadein)
  FadeName("Village");


Download FadeName v1.11 (Requires AGS v2.71)

(Btw, I've re-structured the code in repeatedly_execute_always to make it easier to read, but may have changed the behaviour in the process. Be sure to compare it to your version.)
#790
Just using RawRestoreScreen in rep_ex causes significant frame drop on any system (see this discussion). If that concerns you, you may have to take another approach to your problem.
#791
Yeah, I think a Button.RunInteraction(CursorMode) function similar to those of Characters and Objects is a good idea.
#792
Quote from: Pumaman on Tue 06/09/2005 23:28:46
Quote from: strazer on Tue 06/09/2005 21:40:49Would it be possible to make mouse.SaveCursorUntilItLeaves also restore the mouse cursor when leaving a GUI?
It would simplify things like changing the mouse cursor over a GUI so we could do something like

Sounds like a reasonable request, I'll certainly consider it.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=546
#794
AGS doesn't support WAV files for music. Just convert it to OGG or MP3.

Edit:

Quote from: Pumaman on Sun 05/06/2005 23:32:14AGS v2.71 RC3:
* Fixed WAV music files not being picked up from MUSIC.VOX
#795
In what situation do you need this?

In script, you could do for example
Code: ags

  if (cGuy.Room == 3) cGuy.Say("This");
  else if (cGuy.Room = 4) cGuy.Say("That");


In dialog script, use the above code with the run-script dialog script command and dialog_request (look it up in the manual or search the forum).
You could also make two versions of a dialog option with different text and enable the right one/disable the wrong one before you start the dialog, depending on which room the NPC is in:

Code: ags

  // script for interaction: Talk to GUY

  if (cGuy.Room == 3) {
    SetDialogOption(1, 3, eOptionOn);
    SetDialogOption(1, 4, eOptionOff);
  }
  else if (cGuy.Room == 4) {
    SetDialogOption(1, 3, eOptionOff);
    SetDialogOption(1, 4, eOptionOn);
  }
  RunDialog(1);


You could also run different dialogs altogether, of course.
#796
Your GUI's position is updated by the code in the repeatedly_execute function. So ferociously moving the mouse and clicking probably worked a few times because the GUI's position hadn't been updated yet. Also, rep_ex doesn't run when the game is blocked (repeatedly_execute_always does), so maybe it has something to do with that.
Anyway, glad it works now.
#797
Since the GUI is directly under the mouse cursor, the GUI is clicked instead of the room background beneath.

Either position the GUI a bit away from the mouse cursor ("mouse.y + 2" for example) or simply uncheck the GUI's "Clickable" checkbox in the editor.
#798
Quote from: Janik on Sat 05/11/2005 07:01:46
Hmm, how about having a chunk of script code right there in the dialog script? Perhaps just have curly brackets indicate the start/end of it.

That looks really neat. I hope something like this can be implemented.

Edit:

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=550
#799
If I understand you correctly, can't you just make the object non-clickable (oWire.Clickable property) and use a real hotspot on the engine?
#800
Good work, very nice idea for a module!

But correct me if I'm wrong, using an overlay, true-type fonts won't be anti-aliased, right? Is this mentioned in the ReadMe?
You could give the user the option to specify a GUI that the module would use instead.
SMF spam blocked by CleanTalk