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.


Messages - shadowof047

Pages: [1]
1
Playmaker Help / Re: Game with a lot of data
« on: March 12, 2017, 07:30:18 AM »
After some more search about saving into google cloud , and that particular action which i mentioned in the post above ("AN_CreateNewSnapshot") , i learned that i can also pass in a json string for data to save !

For example , lets say i have these 3 variables :

int hp = 100;
int damage = 10;
string name = John;

How do i make a json string out of these in playmaker ?

Here is some example of how its done in c# , according to Android native plugin's unity forums.

Code: [Select]
    int points = 20;
    int bullets = 15;
    float time = 120f;
     
    Dictionary<string, object> JsonData = new Dictionary<string, object>();
    JsonData.Add("points", points);
    JsonData.Add("bullets", bullets);
    JsonData.Add("time", time);
     
    string data = ANMiniJSON.Json.Serialize(JsonData);
    GooglePlaySavedGamesManager.Instance.CreateNewSnapshot("Name", "Dexscription", coverImage, data, playedTime);

2
Work In Progress... / Re: Turn based - Front Mission style
« on: March 12, 2017, 01:21:10 AM »
That made me remember "front mission" series , man i miss those good old times.
your game is looking  good . keep up the good work .

3
I never used this action before, but I believe that Hashset do not have order. You should use a list data structure.

well , there goes my hope for a conversation system with hashtable :-\ .
i already made a similar system with arraylists , but i liked the hastable one better  ;D

4
Hello .

As i said in the title , the action "hashtable add many" doesnt add items in the order defined in it , it seemed random to me , but maybe there is a pattern to it.

the order is important because i'm trying to use hashtables for a series of simple conversations between some characters , but now , sentences are getting mixed up. i am aware i can do this some other way . but this is also simple and easy.

In the attached picture you can see that , the items order in the action is different than the hashtable proxy .so  is this a bug or i can fix this ?

5
Playmaker Help / Re: Game with a lot of data
« on: February 21, 2017, 04:39:11 PM »
Thanks for the quick reply .
i'm leaning toward GDE because in the tutorials i saw , making data in it is ALOT easier than other options . all of it is done in the editor , and getting/setting data in runtime is very straightforward and easy compared to xml with datamaker xml.

i dont know if GDE can edit google spreadsheet data during runtime or not .but in GDE tutorials it shows that it initialized a .txt file and all the data is save into that .txt file .

so is it possible to save that .txt file into google account somewhere during saves and read from it later ?

Also i'm not sure how does Stan's asset "android native plugin works . i think the action for save is "AN_CreateNewSnapshot" ,but i couldnt figure out how it works or what data it saves (it only has a string field for save data) https://unionassets.com/android-native-plugin/actions-list-98#an_createnewsnapshot

6
Playmaker Help / Game with a lot of data
« on: February 21, 2017, 03:22:15 PM »
I'm trying to make a game like "magic rush" or even "clash royale" which contains alot of data like this :

hp , mp , attack , magic def , phys def , critical rate , etc  ....
all of this for each hero and player may have more than a hundred heroes .

After searching a bit , i think my options are :
 
1- Game data Editor(GDE)
2- Inventory pro ( well , every hero or card could be just an item with some stats in those kind of games if you think about it)
3-Playmaker's Datamaker .

at the moment i'm leaning toward GDE .

and i want to save players data in the google account for each player and after some research i think i can do this with "Android native plugin" from stan's assets .

but i have little experience in making this kind of games with alot of data and i'm sure you guys can give me some pointers . so the question is , which path is easier ? which one can be saved into google account ?
i have absolutely no experience in working with google account , and i couldnt find any tutorial for saving and loading to google account with playmaker .
so if anyone can help , i appreciate it :)


7
Playmaker Help / How Should i save ArrayList of Sprites ?
« on: November 02, 2016, 04:52:59 PM »
Hello .

I'm trying to make a simple inventory system for my game .

Every time the player picks up and item , i clone my "Item" prefab ( from the assets folder),which contains an sprite image component, then change its name and sprite and parent it to my "Inventory" GameObject .

When i want to save , i iterate through all the childs of the "Inventory" GameObject , and save their Names and Sprites to seperate List Arrays , so that when i load , i can create the items which was Parented the "Inventory"

I can save the Names Array List easily with EasySave2 , since it contains only Strings , but ES2 doesnt support Sprites ,how can i save the Sprites Array List ?

Alternatively , Since the name of the items and their respective sprites are the same , how can i search the asset folder for the respective sprite ?

8
Bump ,

I'm also interested in this . an action which loads the fsm state would be great .

9
Playmaker Help / Re: Cant Find a Property with "Set Property"
« on: May 01, 2016, 04:07:48 AM »
Hi .
Thanks " mdotstrange " for all the support you have given .

Thats a good idea Jean , i'm gonna try it since it is the best 3rd controller there is ( in my idea ) and many would benefit from the integration of playmaker in it, including the developer .

10
Playmaker Help / Re: Cant Find a Property with "Set Property"
« on: April 27, 2016, 04:15:29 AM »
it is very kind of you to even try  , and i appreciate it .
Since it a paid asset , i'm not sure what the rules are about putting it's script here  :'(

11
Playmaker Help / Re: Cant Find a Property with "Set Property"
« on: April 26, 2016, 11:19:00 PM »
Where is that vObjectDamage script used? Is it attached to the Playable character or NPC? I attached an action- I don't have the asset so I can't test it- but if the script is on the object with this FSM it will set it-

"vObjectDamage" script is not even in the scene , there is a line in "MeleeWeapon" script :

Code: [Select]
public Damage damage;

this Damage class is declared in "vObjectDamage"  , but only "MeleeWeapon" script exists in the scene .

I just tested the actions that you kindly wrote , it isays "Gameobject requires a vObjectDamage Component"  , but that script is not attached to my game object ( in this case , the player)

12
Playmaker Help / Re: Cant Find a Property with "Set Property"
« on: April 26, 2016, 07:12:53 AM »
Ok what variables do you want to access?

Do you want to set them from a Playmaker action or get them?

i want to Set the "value" and "ignoreDefense" variables with playmaker action .
Thank you very much

13
Playmaker Help / Re: Cant Find a Property with "Set Property"
« on: April 25, 2016, 08:30:36 PM »
If you can't access what you want in a script via get/set property or the method actions included with PM in the ScriptControl section you'll need a custom action-

I'm just an amateur coder but if you post the scripts I can have a go at making an action for it when I get the chance-

That would be greatly appreciated because i'm really stuck  :-[

Here is the complete first script which is called "MeleeWeapon.cs" :

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

public class MeleeWeapon : MeleeItem
{
    #region variables
    [Header("Weapon Settings")]
    public int ATK_ID;
    public int MoveSet_ID;
   
public Damage damage;
    public DamagePercentage damagePercentage;

    [Tooltip("How much stamina the attack will consume")]
    public float staminaCost = 30f;
    [Tooltip("Time for the stamina to recover")]
    public float staminaRecoveryDelay = 1f;

    [Header("Hitbox Settings")]
    [Range(0.1f, 2.9f)]
    public float centerSize = 1f;
    [Range(-1.4f, 1.4f)]
    public float centerPos = 0f;
    public BoxCollider top, bottom, center;
    public bool showHitboxes;
    public HitProperties hitProperties { get; set; }
    protected float curCenterSize;
    [HideInInspector]
    public HitBox hitTop, hitBotton, hitCenter;
    public bool lockHitBox = true;           
    #endregion


    [System.Serializable]
    public class DamagePercentage
    {
public float Top = 30f;
        public float Center = 70f;       
    }

    //public override Type GetSubType()
    //{
    //    return GetType();
    //}
    public void Init()
    {
        hitTop = top.GetComponent<HitBox>();
        hitBotton = bottom.GetComponent<HitBox>();
        hitCenter = center.GetComponent<HitBox>();

        hitTop.hitBarPoint = HitBarPoints.Top;
        hitCenter.hitBarPoint = HitBarPoints.Center;
        hitBotton.hitBarPoint = HitBarPoints.Bottom;

        hitTop.hitControl = this;
        hitBotton.hitControl = this;
        hitCenter.hitControl = this;

        #region Set ignore collision for all hitBox
        //if (transform.GetComponentInParent<MeleeEquipmentManager>() != null)
        //{
        //    Physics.IgnoreCollision(top, bottom);
        //    Physics.IgnoreCollision(bottom, center);
        //    Physics.IgnoreCollision(center, top);
        //    var meleeManager = transform.GetComponentInParent<MeleeEquipmentManager>();
        //    if(meleeManager==null)
        //    {
        //        Debug.LogWarning("The " + gameObject.name + " don't have a MeleeEquipmentManager");
        //    }
        //    var col = meleeManager.GetComponent<Collider>();

        //    if (col != null && col.enabled)
        //    {             
        //        Physics.IgnoreCollision(col, bottom);
        //        Physics.IgnoreCollision(col, center);
        //        Physics.IgnoreCollision(col, top);

        //        var colChild = meleeManager.GetComponentsInChildren<Collider>();
        //        foreach (Collider _col in colChild)
        //        {
        //            if (!_col.Equals(bottom) &&
        //                !_col.Equals(center) &&
        //                !_col.Equals(top) && _col.enabled)
        //            {
        //                Physics.IgnoreCollision(_col, bottom);
        //                Physics.IgnoreCollision(_col, center);
        //                Physics.IgnoreCollision(_col, top);
        //            }
        //        }
        //    }
        //}
        #endregion
    }   

    public bool isActive { get { return active; } }

    public struct DamageType
    {
        public Collider hitCollider;
        public HitBarPoints hitBarPoints;
    }
}

and here is the second script which is called "vObjectDamage" :

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

public class vObjectDamage : MonoBehaviour
{   
    public Damage damage;   
    [Tooltip("List of tags that can be hit")]
    public List<string> tags;   
    public bool useTrigger, useCollision;

void OnCollisionEnter(Collision hit)
{
        if (!useCollision)
            return;
if(tags.Contains(hit.transform.tag))
{
            damage.sender = transform;
            // apply damage to Character           
            hit.transform.SendMessage ("TakeDamage", damage, SendMessageOptions.DontRequireReceiver);
}
}

    void OnTriggerEnter(Collider hit)
    {
        if (!useTrigger)
            return;
        if (tags.Contains(hit.transform.tag))
        {
            damage.sender = transform;
            // apply damage to Character
            hit.transform.SendMessage("TakeDamage", damage, SendMessageOptions.DontRequireReceiver);           
        }
    }
}

[System.Serializable]
public class Damage
{
    [Tooltip("Apply damage to the Character Health")]
    public int value;
    [Tooltip("Apply damage even if the Character is blocking")]
    public bool ignoreDefense;
    [Tooltip("Activated Ragdoll when hit the Character")]
    public bool activeRagdoll;
    [HideInInspector] public Transform sender;
    [HideInInspector] public Recoil_ID recoil_id;

    public Damage (int value, bool ignoreDefense, bool activeRagdoll, Transform sender, Recoil_ID recoil_ID)
    {
        this.value = value;
        this.ignoreDefense = ignoreDefense;
        this.activeRagdoll = activeRagdoll;
        this.sender = sender;
        this.recoil_id = recoil_ID;
    }

    public enum Recoil_ID
    {
        low,
        medium,
        hard
    }

    public Damage(Damage damage)
    {
        this.value = damage.value;
        this.ignoreDefense = damage.ignoreDefense;
        this.activeRagdoll = damage.activeRagdoll;
        this.sender = damage.sender;
        this.recoil_id = damage.recoil_id;
    }
}

14
Playmaker Help / Re: Cant Find a Property with "Set Property"
« on: April 25, 2016, 05:46:16 AM »
After doing some more search i found this topic on the forum which had a similar problem like me :

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

After reading through it , i found that the variables i'm trying to access is from Damage class . but i cant quite find a way to solve my problem , here is the line which declares a damage class in first script :

Code: [Select]
public Damage damage;
and here is the actual damage class in second script :

Code: [Select]
public class Damage
{
    [Tooltip("Apply damage to the Character Health")]
    public int value;
    [Tooltip("Apply damage even if the Character is blocking")]
    public bool ignoreDefense;
    [Tooltip("Activated Ragdoll when hit the Character")]
    public bool activeRagdoll;
    [HideInInspector] public Transform sender;
    [HideInInspector] public Recoil_ID recoil_id;

    public Damage (int value, bool ignoreDefense, bool activeRagdoll, Transform sender, Recoil_ID recoil_ID)
    {
        this.value = value;
        this.ignoreDefense = ignoreDefense;
        this.activeRagdoll = activeRagdoll;
        this.sender = sender;
        this.recoil_id = recoil_ID;
    }

    public enum Recoil_ID
    {
        low,
        medium,
        hard
    }

    public Damage(Damage damage)
    {
        this.value = damage.value;
        this.ignoreDefense = damage.ignoreDefense;
        this.activeRagdoll = damage.activeRagdoll;
        this.sender = damage.sender;
        this.recoil_id = damage.recoil_id;
    }
}

So how should i modify the first script to access "Value" variable in Damage class ? thanks.

15
Playmaker Help / Cant Find a Property with "Set Property"
« on: April 25, 2016, 12:18:08 AM »
Hello .
At first i wanna say that i searched the forum for this and found some other topics such as this :

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

but i couldnt find my answer there . so here is my question :

I have this script :

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

public class MeleeWeapon : MeleeItem
{
    #region variables
    [Header("Weapon Settings")]
    public int ATK_ID;
    public int MoveSet_ID;
   
    public Damage damage;
    public DamagePercentage damagePercentage;

    [Tooltip("How much stamina the attack will consume")]
    public float staminaCost = 30f;
    [Tooltip("Time for the stamina to recover")]
    public float staminaRecoveryDelay = 1f;

    [Header("Hitbox Settings")]
    [Range(0.1f, 2.9f)]
    public float centerSize = 1f;
    [Range(-1.4f, 1.4f)]
    public float centerPos = 0f;
    public BoxCollider top, bottom, center;
    public bool showHitboxes;
    public HitProperties hitProperties { get; set; }
    protected float curCenterSize;
    [HideInInspector]
    public HitBox hitTop, hitBotton, hitCenter;
    public bool lockHitBox = true;           
    #endregion


    [System.Serializable]
    public class DamagePercentage
    {
public float Top = 30f;
        public float Center = 70f;       
    }

    public void Init()
    {
        hitTop = top.GetComponent<HitBox>();
        hitBotton = bottom.GetComponent<HitBox>();
        hitCenter = center.GetComponent<HitBox>();

        hitTop.hitBarPoint = HitBarPoints.Top;
        hitCenter.hitBarPoint = HitBarPoints.Center;
        hitBotton.hitBarPoint = HitBarPoints.Bottom;

        hitTop.hitControl = this;
        hitBotton.hitControl = this;
        hitCenter.hitControl = this;

    }   

    public bool isActive { get { return active; } }

    public struct DamageType
    {
        public Collider hitCollider;
        public HitBarPoints hitBarPoints;
    }
}

I want to access the float "Top " and float "Center" in the Class "DamagePercentage" , but they are nowhere to be found .

Also when i add this script some other variables shows up in the inspector such as float "Value" or bool "Ignore Defense " which are not even in the script ( and i'm too noob to know where it is reading them from )

It maybe worth mentioning that it is "Melee Weapon" Script from " Melee Combat Template " asset by Invector .

Can someone help me on this ?



Pages: [1]