playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - djaydino

Pages: 1 ... 4 5 [6] 7
76
Playmaker Help / create prefab inside canvas
« on: June 11, 2015, 07:55:07 AM »
hi,
how can i create a prefab as a child of (for example) Canvas

i was first using the canvas text but could not get it to create inside the canvas.

greetings Dino

77
Playmaker Help / more than 10 digits in unity[SOLVED]
« on: June 07, 2015, 08:25:51 AM »
hi,

i have a score system that runs up very fast in later levels
and should have more than 10 digits but unity does not go higher than 10 digits.

the score system works similar like this game : Cookie Clicker

also thing to buy will be deducted from that score. similar from Cookie Clicker

any suggestions are very welcome.

78
Android Help / Check internet Action not working well on android
« on: April 23, 2015, 07:55:35 PM »
Check internet does not seem to work very well on android device :

when i am offline from a fresh restart it gives offline correctly,
then i go online and start the game and it gives online correctly.

but then when i disconnect the internet and start the game again it still gives online as result... i tried editing the url, changed it to my own website, but gives the same result....

greetings,

Dino
Modify message

79
Playmaker Bug Reporting / tool windows disable
« on: March 29, 2015, 04:31:45 PM »
hi,

i accidentally Enabled Tool Windows When Playing
and i found the settings (preferences/General) wich should set it back to normal.
but it does not... thats just the minor part

the major problem now is :

when i play the game and stop at any given time the globals are saved and not set back to their original state....

this messed up loads of globals, i got it all good now...
but i can't get it back to normal.
it still messes up the globals when i play and stop it

using playmaker V 1.7.7.f6
unity3d v 4.6.4f1

friendly greetings,

Dino

80
Share New Actions / Random Int No Repeat
« on: January 27, 2015, 05:06:20 AM »
hi, i have added a option to random int.

you can choose now if the int result can be the same 2x in a row or not.

you can also find this on the EcoSystem

friendly greetings,

Dino

if there is an interest in a no repeat on random float, let me know.

81
Playmaker Help / random int no repeat[SOLVED]
« on: January 26, 2015, 05:18:46 PM »
hi,
i'm making an action request but having a problem.
i have no errors on my action and with the debug log i get the desired result.

BUT when i play i can see that the "Store Result" is changed to none.
I think i'm just to tired atm to see whats wrong but i thought i drop it here :)

here's my code :

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2015. All rights reserved.
// 'inclusiveMax' option added by MaDDoX (@brenoazevedo)
// no repeat option added by DjayDino
/*--- __ECO__ __ACTION__ ---*/

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Math)]
[Tooltip("Sets an Integer Variable to a random value between Min/Max.")]
public class RandomIntNoRepeat : FsmStateAction
{
[RequiredField]
public FsmInt min;
[RequiredField]
public FsmInt max;
[RequiredField]
[UIHint(UIHint.Variable)]
public FsmInt storeResult;
        [Tooltip("Should the Max value be included in the possible results?")]
        public bool inclusiveMax;
public FsmBool noRepeat;

private int randomIndex;
private int lastIndex = -1;

public override void Reset()
{
min = 0;
max = 100;
storeResult = null;
// make default false to not break old behavior.
    inclusiveMax = false;
noRepeat = false;
}

public override void OnEnter()
{
PickRandom();
            Finish();
}

void PickRandom()
{
if (noRepeat.Value)
{
do
{
randomIndex = (inclusiveMax) ?
Random.Range(min.Value, max.Value + 1) :
Random.Range(min.Value, max.Value);
} while ( randomIndex == lastIndex);

lastIndex = randomIndex;
storeResult = randomIndex;

}else
{
randomIndex = (inclusiveMax) ?
Random.Range(min.Value, max.Value + 1) :
Random.Range(min.Value, max.Value);
storeResult = randomIndex;
}
Debug.Log("" +storeResult);
Debug.Log("" +randomIndex);
}
}
}


friendly greetings,

Dino

82
Share New Actions / Easy Save 2 Add int / float
« on: January 23, 2015, 04:04:47 AM »
hi,
i made 2 new "Easy save 2" Action to add an int / float to a ES2 int / float

 they work the same as the Playerprefs add int / float but then for easy save 2

Warning use Easy save 2 only on key moments

these actions might be added later to the easy save 2 default Actions.
if so probably under a different name and these actions can still be used

these action can also be found on the EcoSystem

83
Share New Actions / PlayerPrefs Add Int / Float
« on: January 20, 2015, 12:55:30 PM »
hi,
i made 2 PlayerPrefs Action to add an int / float to a playerprefs int / float

this combines a : pp Get (int/float) / add (int/float) / pp Set (int/float) into 1 action

Warning use PlayerPrefs only on key moments

don't use this like :
adding score every frame or something,
add score on a variable and add to pp for example : end of a level , when player dies etc.

these action can also be found on the EcoSystem


84
Playmaker Help / new action playerprefs add int / float[SOLVED]
« on: January 19, 2015, 04:09:44 AM »
hi,

i made a new action to add an int / float to a playerprefs int / float

so not to have to set 3 actions to do this (pp get int, int add, pp set int)

but i am trying to get it to work for multiple variables (Count)

when played i get Nullreference on line 26

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2015. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("PlayerPrefs")]
[Tooltip("Adds a value to a playerprefs int identified by key.")]
public class PlayerPrefsAddInt : FsmStateAction
{
[CompoundArray("Count", "Key", "Variables")]
[Tooltip("Case sensitive key.")]
public FsmString[] keys;
public FsmInt[] add;
private FsmInt[] ppValue;

public override void Reset()
{
keys = new FsmString[1];
ppValue = new FsmInt[1];
add = new FsmInt[1];
}

public override void OnEnter()
{
for(int i = 0; i<keys.Length;i++)
{
if(!keys[i].IsNone || !keys[i].Value.Equals(""))  ppValue[i].Value = PlayerPrefs.GetInt(keys[i].Value, ppValue[i].IsNone ? 0 : ppValue[i].Value);

ppValue[i].Value += add[i].Value;

PlayerPrefs.SetInt(keys[i].Value, ppValue[i].IsNone ? 0 : ppValue[i].Value);
}
Finish();
}

}
}

it has to do with the ppValue...
i don't have much experience with arrays and i guess somethings is wrong in that direction...

here is the code from the working "single add int to playerprefs" DO NOT USE THIS in your project as this will be changed when i got this working on multiple values (count)
Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2015. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("PlayerPrefs")]
[Tooltip("Adds a value to a playerprefs float identified by key.")]
public class PlayerPrefsAddInt : FsmStateAction
{
[Tooltip("Case sensitive key.")]
public FsmString key;
public FsmInt add;
private FsmInt variables;

public override void Reset()
{
key = "";
variables = new FsmInt();
add = null;
}

public override void OnEnter()
{
if(!key.IsNone || !key.Value.Equals("")) 
variables.Value = PlayerPrefs.GetInt(key.Value, variables.IsNone ? 0 : variables.Value);

variables.Value += add.Value;

PlayerPrefs.SetInt(key.Value, variables.IsNone ? 0 : variables.Value);

Finish();
}

}
}

85
Playmaker Help / application focus
« on: December 10, 2014, 09:43:02 PM »
hi, is there a way to Not Broadcast application focus on startup?

i got several "application focus" global transitions, but i do not want them to trigger on startup

Greetings,

Dino

86
Playmaker Help / Led display
« on: December 05, 2014, 08:25:36 PM »
hi,

i am working on a Led Display (using sprites no text), but trying to figure out what the best approach is.

there will be custom text running (player name, and score updating every frame)
and this is running from right to left.

i'm thinking to loop an animation with  empty sprites from right to left and update those sprites every frame with text

or using set postions wait .1 and set next postion instead of animation
and somehow set the text on it.

Here is a sample of the display

Greeting,

Dino

87
Playmaker Help / Light sequence
« on: November 27, 2014, 03:01:58 AM »
hi, i am making a light strip with 20+ lights and i want to let a light run in 50+ different preset sequences (left to right, right to left, stop for a seccond @ light nr4 and so on) giving each light a number 01-20+ so i can set it like this (for example) :
1,2,3,2,3,4,5,wait 0.5,6,5,4,5,6 and so on for a sequence

whats the best way to do this?
i know how to do this with states but that is gonna be a lot of work.

88
Share New Actions / Countdown Timer
« on: November 24, 2014, 12:27:03 AM »
hi, i made a countdown timer action for one of my projects and i will share it here :)
i don't know if it exist already but i could not find 1 so here it is :

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.
/*--- __ECO__ __ACTION__ ---*/

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Time)]
[Tooltip("Countdown from a certain time to a certain time and possible to display time left")]
public class CountdownTimer  : FsmStateAction
{
[RequiredField]
[Tooltip("Time To Countdown from")]
public FsmFloat time;
[Tooltip("Stop timer when this time is reached. Value must be lower than time")]
public FsmFloat stopOn;
public FsmEvent finishEvent;
public bool realTime;
public FsmFloat storeValue;

private float startTime;
private float timer;

public override void Reset()
{
time = 1f;
stopOn = 0f;
finishEvent = null;
realTime = false;
storeValue = null;
}

public override void OnEnter()
{
if (time.Value <= stopOn.Value)
{
Fsm.Event(finishEvent);
Finish();
return;
}

startTime = FsmTime.RealtimeSinceStartup;
timer = 0f;
}

public override void OnUpdate()
{
if (realTime)
{
timer = FsmTime.RealtimeSinceStartup - startTime;
storeValue.Value = time.Value - timer;
}
else
{
timer += Time.deltaTime;
storeValue.Value = time.Value - timer;
}

if (storeValue.Value <= stopOn.Value)
{
Finish();
if (finishEvent != null)
{
Fsm.Event(finishEvent);
}
}
}

}
}

you can let it countdown to any value and you can store the time left value to convert it to a string.

and should be ready to be added to the Ecosystem.

greets djaydino

Edit : Countdown Timer is now Available on the Ecosystem.

89
Playmaker Help / Random Weighted int problem [SOLVED]
« on: October 26, 2014, 01:12:48 PM »
hi, i wanted to use the custom Action : Random Weighted int
But it is giving me the result 0,1,2,3,4,5
and not the numbers i placed in them.
i am using (testing) unity 4.6.0.b17

i have set it up like this :

90
Action Requests / iTween value to
« on: October 19, 2014, 04:09:30 PM »
hi,
i would like to have an action for a line in this script i made :

Code: [Select]
using UnityEngine;
using System.Collections;

public class ValueTo : MonoBehaviour {
public int int1 = 0;
public int int2 = 100;
public GUIText scoreDisplay;

void OnMouseDown(){
//go from value 1 to value 2:
//this next line i would like to have a playmaker action for
iTween.ValueTo(gameObject, iTween.Hash("from",int1,"to",int2,"time",6,"onUpdate","UpdateScoreDisplay","easetype","easeOutBounce"));

}

void OnMouseUp(){
}

void UpdateScoreDisplay(int newScore){
scoreDisplay.text = "Score: " + newScore.ToString();
}
}

i tried to make it myself but i'm getting an error you can check it in this topic

this would be very useful for me can can be usefull in many ways :)

Pages: 1 ... 4 5 [6] 7