View Single Post
  #10  
Old 05-07-2012, 11:39 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
This is the gist of storing a 'key' as a flag instead of using a weapon.

Key NPC:

PHP Code:
function onPlayerTouchsMe() {
  
clientr.key true// This can be found in the script flags tab of your attributes

Door NPC:

PHP Code:
function onPlayerTouchsMe() {
  if (
clientr.key) {
    
hide();
    
sleep(3);
    
show();
  }

Also 1 is the same as true in GS2.

Documentation:
clientr variable explanation
Logic and conditional statements
__________________
Quote:
Reply With Quote