Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → To check player has item before they leave a sector
To check player has item before they leave a sector
2001-04-16, 7:49 PM #1
I want to right a cog to make sure the player has found the lightsaber before they leave a sector can anyone help
2001-04-17, 9:28 AM #2
Code:
symbols
symbols
thing player local
end
#--------------------------------------------
code
player=GetLocalPlayerThing
has_saber=GetInv(player,10)
if (has_saber==1)
{
something for a sector, I dont know any sector verbs...   [http://forums.massassi.net/html/biggrin.gif]
}
end



------------------
I am the EDITING FANATIC!!! RUN IN FEAR!!!My witty, everchanging comments shall be your BANE!

[This message has been edited by scott_karana (edited April 17, 2001).]

[This message has been edited by scott_karana (edited April 17, 2001).]
Hey, I'm here! But who cares?
2001-04-17, 3:43 PM #3
Here's Scott's code with the sector check added.
Code:
symbols

message 	startup
message  exited

thing  player  local
sector  saber_sector  linkid=1

end

#---------------------------------------

code

startup:
  player = GetLocalPlayerThing();
  return;

exited:
  has_saber = GetInv(player,10)
  if (has_saber == 0) 
    {    //....Put code here for player without saber

    return;
    }
  return;

end


------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2001-04-18, 9:55 AM #4
Yeah, I didn't include the messages, I'm not too good at 'em, and I thought he may have known that much for that kinda cog.
Hey, I'm here! But who cares?
2001-04-19, 1:35 PM #5
how are u planning on keeping the guy in the sector? are u going to have a door open once he crosses an ajoin with the saber?
roses are red, violets are blue, I am schizophrenic, and I am too!

↑ Up to the top!