Hi
I am dry running a project.
I am working on a control pad and need a little help with the following:
The Control Pad is a GUI.
On the GUI is a ListBox which has various items (weapons)
On selecting a List Item the cursor changes to ActiveInventory of that weapon.
This seems to works ok.
I Also have Flashlight Plugin On/Off Buttons. This also works.
My main problem at the moment is collide.
I have set up a boolean to be true when ListItem Sonar is selected.
When the Boolean is true (Sonar selected), I have a collide code that runs:
Code: ags
Obviously this will run forever in Rep Exec. (Have used in Room 1 to test)
I have tried DoOnceOnly to no avail but I obviously need to STOP Events running and allow player to carry on walking but to Run when collide and sonar are true.
What would be the best way to do this? I would prefer not to lose Sonar selected if possible as NPC character can randomly move.
EDIT
At this moment I am trying:
Code: ags
This Walk(cWaeks) with be Random when coded.
This seems to do what I want. I'm trying now to select ListBox Item as Inventory and use it on cWaeks.
I hope I have put this in an understandable way.
cheers
I am dry running a project.
I am working on a control pad and need a little help with the following:
The Control Pad is a GUI.
On the GUI is a ListBox which has various items (weapons)
On selecting a List Item the cursor changes to ActiveInventory of that weapon.
This seems to works ok.
I Also have Flashlight Plugin On/Off Buttons. This also works.
My main problem at the moment is collide.
I have set up a boolean to be true when ListItem Sonar is selected.
When the Boolean is true (Sonar selected), I have a collide code that runs:
function room_RepExec()
{
if (Sonar==true && cEgo.x - cWaeks.x <= 30 && (cEgo.x >= cWaeks.x) || (cWaeks.x - cEgo.x < 30 && cWaeks.x > cEgo.x)
)
cEgo.Say("He is around here somewhere!");
}
Obviously this will run forever in Rep Exec. (Have used in Room 1 to test)
I have tried DoOnceOnly to no avail but I obviously need to STOP Events running and allow player to carry on walking but to Run when collide and sonar are true.
What would be the best way to do this? I would prefer not to lose Sonar selected if possible as NPC character can randomly move.
EDIT
At this moment I am trying:
cEgo.Say("He is around here somewhere!");
cWaeks.Walk(cWaeks.x + 50, cWaeks.y - 0, eNoBlock, eWalkableAreas);
This Walk(cWaeks) with be Random when coded.
This seems to do what I want. I'm trying now to select ListBox Item as Inventory and use it on cWaeks.
I hope I have put this in an understandable way.
cheers