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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script help
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#12
RE: Script help

if("asParent" == "Chem1" && GetLocalVarInt("Var1") == 1)

asParent doesn't exist in that function, and "Var1" will not be equal to 1 after 2 of the chemicals have been added, since 1 is being added to the value each time. Also, when using the name of a variable, you need to not have it surround by the quotation marks " ", those are only used for the value of a string variable.

here...
void UsedChemsOnPot(string &in asItem, string &in asEntity)
The 2 variables you have available are the Item being used (called asItem) and the entity that you are using the item on (called asEntity)


So the 'if' statement should be
if (asItem == "Chem1")

03-27-2013, 04:11 PM
Find


Messages In This Thread
Script help - by Rakez68 - 03-27-2013, 01:36 PM
RE: Script help - by Adrianis - 03-27-2013, 01:56 PM
RE: Script help - by Rakez68 - 03-27-2013, 02:08 PM
RE: Script help - by Adrianis - 03-27-2013, 02:15 PM
RE: Script help - by Rakez68 - 03-27-2013, 02:46 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 02:55 PM
RE: Script help - by Rakez68 - 03-27-2013, 03:23 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 03:27 PM
RE: Script help - by Rakez68 - 03-27-2013, 03:39 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 03:40 PM
RE: Script help - by Rakez68 - 03-27-2013, 04:09 PM
RE: Script help - by Adrianis - 03-27-2013, 04:11 PM
RE: Script help - by Rakez68 - 03-27-2013, 04:50 PM
RE: Script help - by Adrianis - 03-27-2013, 05:44 PM



Users browsing this thread: 1 Guest(s)