playMaker

Author Topic: Adding two variables together? [SOLVED]  (Read 2944 times)

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
Adding two variables together? [SOLVED]
« 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
« Last Edit: March 11, 2013, 01:11:34 AM by Alex Chouls »

Vallar

  • Junior Playmaker
  • **
  • Posts: 90
Re: Adding two variables together?
« Reply #1 on: March 05, 2013, 02:16:01 PM »
Hello,

So far from what I know of Playmaker, yes, you have to do it twice.

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Adding two variables together?
« Reply #2 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)
Best,
Sven

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Adding two variables together?
« Reply #3 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.

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
Re: Adding two variables together?
« Reply #4 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 :)