Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: JennaReanne on March 05, 2013, 11:29:30 AM

Title: Adding two variables together? [SOLVED]
Post by: JennaReanne on March 05, 2013, 11:29:30 AM
Hi all,
Another newbie question here.. I think I'm going to start all my forum messages that way for a while :)

I'm coming from GameSalad so I'm still trying to figure out PlayMaker best practices.  In this particular case I have 3 int variables.  I'm randomly setting Variable1 and Variable2 (which is nice and easy), and I would like Variable 3 = Variable 1 + Variable 2.  What is the best way to go about doing this?  Do I need to add two separate "Int Add" actions?

Thank you,
Jenna
Title: Re: Adding two variables together?
Post by: Vallar on March 05, 2013, 02:16:01 PM
Hello,

So far from what I know of Playmaker, yes, you have to do it twice.
Title: Re: Adding two variables together?
Post by: kiriri on March 05, 2013, 02:23:22 PM
I don't think I understand you correctly. To do x = y + z you would use the "int Operator" action. You use int add only if you want to do x += y (which is the same as x = x + y)
Title: Re: Adding two variables together?
Post by: Red on March 05, 2013, 02:49:47 PM
Wow, that was a quick response! you said what i was aiming for too.

That being said, to OP... Don't be afraid of showing your newbie-ness... we all had to start off somewhere and asking questions is the best way to learn imo.
Title: Re: Adding two variables together?
Post by: JennaReanne on March 05, 2013, 03:09:45 PM
Thank you, int Operator is definitely what I was looking for!  I've been working on my project with the forums open on the side to look up things when I get stuck, this seems like a really great community and there's a wealth of information already here.  I'll definitely be posting more questions, showing off my newbie-ness in all it's glory :)