Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: morph100 on Fri 15/03/2019 16:15:18

Title: Pull verb on hotspot
Post by: morph100 on Fri 15/03/2019 16:15:18
Sorry another stupid question!

In my room I have a hotspot I want to use the Pull verb with (tumbleweed GUI), under events for my hotspot I have Look, Pick Up Talk etc but no Pull....do I use Interact somehow or do I use Usermode1 somehow?

Thanks!
Title: Re: Pull verb on hotspot
Post by: VampireWombat on Fri 15/03/2019 20:52:25
I haven't actually used the Tumbleweed template for any games and it's been forever since I used the original 9 verbs, but looking at both the provided pdf and the script, you should be able to use pull the same way as you would push, but replace the word push with pull. Something like:

Code (ags) Select
else if(Verbs.UsedAction(eGA_Pull) {
player.Say("Okay.");
}


I'm guessing part of the issue is that it looks like the pdf cuts off pull in the list of defined actions.
Title: Re: Pull verb on hotspot
Post by: morph100 on Fri 15/03/2019 22:20:10
But what function would I put that under?


function handle_Interact()
{
else if(Verbs.UsedAction(eGA_Pull) {
player.Say("Okay.");
}
}
Title: Re: Pull verb on hotspot
Post by: VampireWombat on Fri 15/03/2019 22:36:15
Looking at the pdf included with the Tumbleweed template, you should put it under any_click along with Look, Use, etc.

The first room created when I use the template even has an example with all of the verbs listed out, with Pull right after Push.

Code (ags) Select

function oBlueCup_AnyClick() {
  // WALK TO
  if (Verbs.UsedAction(eGA_WalkTo)) {
    Verbs.GoTo();


Code (ags) Select

  // Push
  else if(Verbs.UsedAction(eGA_Push)) {
    Verbs.Unhandled();
  }
  // Pull
  else if(Verbs.UsedAction(eGA_Pull)) {
    Verbs.Unhandled();
  }
Title: Re: Pull verb on hotspot
Post by: morph100 on Sat 16/03/2019 11:04:00
Awesome I got it working now, thanks that's opened up a lot more possibilities to me now!