playMaker

Author Topic: Add random int  (Read 9003 times)

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Add random int
« on: August 31, 2011, 10:00:53 AM »
I think "Add random int" action will be very nice in PlayMaker.
I can not write it in C because I am not good on it
Bye

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #1 on: August 31, 2011, 10:33:45 AM »
I put a Random Int with Increment Value in the User Share Action section.. Hope this helps. if it is not what you are looking for just let me know.

http://hutonggames.com/playmakerforum/index.php?topic=644.0

Q

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #2 on: August 31, 2011, 10:43:53 AM »
I think yes it is. :)
Thanks a lot
Bye

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #3 on: August 31, 2011, 11:04:56 AM »
No problem

Q

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #4 on: August 31, 2011, 12:18:59 PM »
Hi qholmes your is nice too
But I need a action for when a pick something add a random value to total bullets I have
Bye

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #5 on: August 31, 2011, 12:29:26 PM »
Well it should work for that... When you do your pick you trigger this Action and the Variable in it would be your existing bullet number variable..

It should take the existing value of that one and add a random number to it..

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #6 on: August 31, 2011, 12:47:19 PM »
I see you are not a Beta user so you do not have global variables... So you will have to set a local variable and then use Set FSM Int to update the Bullets variable where it is located..

I think that the new version 1.2 will be out soon and then you can take advantage of Global Variables which will make more sense with this Action..

But if this Action is in the same FSM as the Bullets variable then it should work fine.

Q

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #7 on: August 31, 2011, 06:04:19 PM »
Yes I am with 1.1 not beta
I think is better make a movie for you see better.
Bye

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #8 on: August 31, 2011, 06:24:49 PM »
Just for see better
« Last Edit: August 31, 2011, 06:35:03 PM by Sebastiao »

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #9 on: August 31, 2011, 06:26:50 PM »
And the video
http://www.youtube.com/watch?v=fgIZqYuAFFw
Bye hope this hopeful

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #10 on: August 31, 2011, 11:24:05 PM »
Ok so in the video i noticed that the Increment Value radio button was not turned on... So turn it on and it should work.

Q

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #11 on: September 01, 2011, 07:57:49 AM »
OOOOHHHH my god you are amazing!! :) ;D thanks a lot qholmes
Bye

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #12 on: September 01, 2011, 08:15:52 AM »
Hehh no problem....

I fought with an error for hours last night and eventually realized that i had deleted the using UnityEngine; line........ ahhhhhhhhhhhhhhhh

Oh well

Q

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Add random int
« Reply #13 on: September 01, 2011, 09:26:11 AM »
You are a really good person ;D
Bye

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Add random int
« Reply #14 on: September 01, 2011, 09:51:51 AM »
No biggie.. I like taking a break from work to try and solve problems.. I would rather do that some times instead of my own work..  ;D

Maybe you will be able to help me some day. That is how it works. The big circle of Self Employed Life... ;)

Q