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

#1
Quote from: KhrisMUC on Fri 25/04/2008 13:54:14
Or:
Code: ags
...
  if (click==0) {
    ...
    click=1;
  }
  else {
    ...
  }
...


And since 3.0.1 I think, there's Game.DoOnceOnly.

(btw, this is probably the single most often posted question ever and the most common beginner's problem. Realizing that and doing a forum search first shouldn't be that far-fetched. This forum's first page contains at least one thread dealing with this problem.)
Sorry didn't know there was a forum search. Thanks
#2
Quote from: matti on Fri 25/04/2008 13:25:32
You have to create a variable that checks if the hotspot was clicked a second time.

It should look something like that:

Code: ags

int click=0;

interact_hotspotxy(){

  if (click==0) {  //first time hotspot is clicked


    ...
  }
  if (click==1) {  //second and any further time hotspot is clicked
    ...
  }

if (click==0) {
  click++;
}

}

Thanks my problem is solved now
#3
I have started making a game and I have made it so that when someone interacts with a certain hotspot then they will obtain an item. However I want to make it so that the hotspot interacts differently when they click on it for a second time. Anyone know how ???
SMF spam blocked by CleanTalk