Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Combinating problems
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#6
RE: Combinating problems

PHP Code: (Select All)
void make_explosive(string &in asItemAstring &in asItemB)
{
  if (
GetLocalVarInt("chemical_dynamite") == 0)
  {
   
GiveItem("chemical_container_half""Puzzle""chemical_container_half""chemical_container_half.tga"1);
   
AddLocalVarInt("chemical_dynamite"1);
   
RemoveItem(asItemA); RemoveItem(asItemB);
   
RemoveCombineCallback("Add_var_explosive");
  }
  else if(
GetLocalVarInt("chemical_dynamite") == 1)
  {
   
RemoveCombineCallback("Add_var_explosive_1");
   
AddLocalVarInt("chemical_dynamite"1);
  }
  else if(
GetLocalVarInt("chemical_dynamite") == 2)
  {
   
RemoveCombineCallback("Add_var_explosive_2");
   
AddLocalVarInt("chemical_dynamite"1);
  }


"else" statements do not check if a condition is met. They are executed of none if the other conditions are met. i.e, if "chemical_dynamite" was neither 0, 1 or 2.

I believe several "if" statements will work, but it's generally only used when 2 separate conditions are being checked.
(This post was last modified: 08-02-2013, 11:06 PM by Tomato Cat.)
08-02-2013, 06:43 PM
Find


Messages In This Thread
Combinating problems - by The chaser - 08-02-2013, 01:15 PM
RE: Combinating problems - by PutraenusAlivius - 08-02-2013, 01:31 PM
RE: Combinating problems - by The chaser - 08-02-2013, 03:19 PM
RE: Combinating problems - by Rapture - 08-02-2013, 03:38 PM
RE: Combinating problems - by The chaser - 08-02-2013, 04:21 PM
RE: Combinating problems - by Tomato Cat - 08-02-2013, 06:43 PM
RE: Combinating problems - by Rapture - 08-02-2013, 10:45 PM
RE: Combinating problems - by SilentStriker - 08-03-2013, 09:45 PM
RE: Combinating problems - by Rapture - 08-03-2013, 10:44 PM
RE: Combinating problems - by SilentStriker - 08-04-2013, 01:33 AM
RE: Combinating problems - by The chaser - 08-04-2013, 10:56 AM



Users browsing this thread: 1 Guest(s)