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

#61
Beginners' Technical Questions / Re: Gui phone
Wed 02/03/2022 19:02:51
hi Khris how are you?

for now I have created a gui with 12 keys.
123
456
789
* 0 #

click event and in globalscript

Button6_OnClick function (GUIControl * control, MouseButton button) {
  // USE INV
  OptionGui.OnClick (control, button); {
    player.Say ("1");
  }
}

Button7_OnClick function (GUIControl * control, MouseButton button) {
  // USE INV
  OptionGui.OnClick (control, button); {
    player.Say ("2");
  }
}

etc .. I wish that if the player typed the right number, the animation starts
#62
Beginners' Technical Questions / Gui phone
Wed 02/03/2022 09:54:11
good morning
I created a GUI, a simple phone keypad. I would like to set a number (if you type for example 0012345)
proceed with an action
thanks
#63
Beginners' Technical Questions / Re: give
Wed 09/02/2022 12:25:21
not bad. thank you
#64
Beginners' Technical Questions / Re: give
Wed 09/02/2022 11:00:49
it is theoretically .. the idea is not to create 6 rooms for train departure and 6 rooms for arrival

------

I enter the room
I speak to the stationmaster
tells me to buy the ticket
I go to the ticket office
      change of room
      there are 6 different destinations
      I buy a ticket
I give it to the stationmaster
                     change of room
                     arrival at destination


everything is managed by the iTicketxxx

#65
Beginners' Technical Questions / Re: give
Tue 08/02/2022 19:49:14
Quote from: Khris on Tue 08/02/2022 17:21:27
Oh no, sorry, I didn't mean to disturb you; I had no idea about that pause.

Quick recap:
Use the "any click" event for all interactions. Select an object, hotspot or character, click the âš¡ icon to switch from the properties to the events, select the "any click on..." event, then click the small [...] button that appears at the end of the text field next to the event name. Clicking the ellipses button will create the function and take you to it, so you don't have to worry about where to create it.

Inside the function, use the example code provided in the template to tell AGS how to react based on which verb was used.

You should also definitely take a look at the PDF that comes with the template; you can find it inside your game project folder.

Example code for a cup (room object):
Spoiler
Code: ags
function cup_AnyClick() {
  // LOOK AT
  if (Verbs.UsedAction(eGA_LookAt)) {
    player.Say("It's a blue cup.");
  }
  // USE
  else if (Verbs.UsedAction(eGA_Use)) {
    player.Say("I'd rather pick it up.");
  }
  // PICKUP
  else if (Verbs.UsedAction(eGA_PickUp)) {
    player.Say("Okay.");
    Verbs.AnyClickWalkLookPick(108, 100, eDir_Up, "You are now mine.", oCup.ID, iCup);
  }
  //USE INV
  else if (Verbs.UsedAction(eGA_UseInv)) {
    Verbs.Unhandled();
  }
  // don't forget this
  else Verbs.Unhandled();
}
[close]




I have 6 tickets with different destinations.
I have activated 6 different hotspots that are activated if I give the associated ticket

how can they be put together?

Code: ags




function cControllore_AnyClick() {

 function cControllore_AnyClick() {

  // GIVE TO
  if (Verbs.UsedAction(eGA_GiveTo)) {

    if (Verbs.GetItemGiven() == iTicketxxx1) 
      player.Say("Ecco il mio biglietto");
      cControllore.Say("Bene puoi andare!");
      cControllore.Say("Il treno per xxx1 sta per partire");
      player.LoseInventory(iTicketxxx1);
      Verbs.MovePlayer(155, 120);

    
    if (Verbs.GetItemGiven() == iTicketxxx2) 
      player.Say("Ecco il mio biglietto");
      cControllore.Say("Bene puoi andare!");
      cControllore.Say("Il treno per xxx2 sta per partire");
      player.LoseInventory(iTicketxxx2);
      Verbs.MovePlayer(155, 120);


ecc

    } else {
      cControllore.Say("Non lo voglio");
    }

  }

  }
#66
Beginners' Technical Questions / Re: give
Tue 08/02/2022 17:46:49
Don't worry, you have not offended me, on the contrary it is a stimulus to grow.

I'm experimenting thanks for the info
#67
Beginners' Technical Questions / Re: give
Tue 08/02/2022 14:31:12
i resumed the project after a year and i feel insecure :cry:
#68
Beginners' Technical Questions / Re: give
Tue 08/02/2022 11:04:19
in global script?
#69
Beginners' Technical Questions / Re: give
Tue 08/02/2022 10:54:45
where do you enter the code?
#70
Beginners' Technical Questions / give
Tue 08/02/2022 08:58:14
Hi guys

I have a problem with the tumbleweed template

to enter the character must give a ticket at the entrance.

I can't do this thing.

I also read here
https://www.adventuregamestudio.co.uk/forums/index.php?topic=57962.0

but I don't get out of it
#71
function room_RepExec()
{
if(!cMerlo.Moving)

{
cMerlo.AddWaypoint(36, 129);
cMerlo.AddWaypoint(18, 129);
}}

:grin:

Thanks
#72
Thanks everyone you are fantastic! this forum doesn't make me feel alone ..

I modified it like this.

Code: ags
function room_RepExec()
{
 if(!cMerlo.Moving) {
    cMerlo.Walk(Random(Room.Width) /* full room */,
               Random(50) /* only top to 50 px */,
               eNoBlock /* can't block on rep exec always*/,
               eAnywhere);
}}


for a path from 50 to 150 and 150 to 50, should it be removed randomly?

AddWaypoint?

if(!cMerlo.Moving) { 
cMerlo.Walk(16, 123);
cMerlo.AddWaypoint(1, 123);
#73
thanks i will try it
#74
Hi everyone

I would like a character (a bird) not player to walk back and forth in a loop

I created the loop
I created the character

thank you
#75
thank you all
#76
#77
if or understood

first I install AGS.Plugin.AgsGet.dll

and after Queue dSpeech 410.scm
#78
Quote from: Khris on Tue 25/08/2020 08:45:19

Why are you not trying to use the well documented module instead?



yes Khris sorry, I was replying to Crimson. Late but I wanted to answer
#79

thanks for your patience and sorry if i'm not clear

Crimson.. Sorry you're right, yesterday was a chaotic day, I tried to say background in different ways that I can't tell

let's say

room_RepExec () function
{

cOp1.SayBackground ("& 1 phrase1");
Wait (10);
cOp1.SayBackground ("& 2 answer1");
Wait (10);
cOp1.SayBackground ("& 3 phrase2");
Wait (10);
cOp1.SayBackground ("& 4 answer2");
Wait (10);

}
#80
Quote from: Khris on Mon 24/08/2020 15:47:16
Not sure what you're asking tbh;

the action is simple. The character walks and on the street there are 2 workers talking. I wish the character didn't get stuck
SMF spam blocked by CleanTalk