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 - ergin

Pages: [1] 2 3 ... 6
User Showcase / Re: Zombie Hunter Mike
« on: September 08, 2016, 09:11:44 AM »

PlayMaker Help / Any requirements for Fixed Update?
« on: August 19, 2016, 05:39:37 PM »
I came across an issue which I couldn't be sure of the cause.

- I modified Float Operator script as a custom action executing in Late Update, worked fine
- then I modified it to work in Fixed Update but it didn't work. I added Debug.Log to see if it enters OnFixedUpdate, It didn't.
- I restarted Unity. (nothing changed)
- then I asked myself how all the scripts with OnFixedUpdate worked and added a Rotate Action (which has fixed update option) into that state.(it rotated another game object)

Then magically, modified "Float Operator Fixed Update" started working like a charm.

FixedUpdate is generally used with rigidbody operations, is there a chance that playmaker added a component that made fixedupdate working on that gameobject?

Unity 5.3.4f1 - Playmaker 1.8.1


I found it. :)

Fsm.HandleFixedUpdate = true; has to be added into OnPreprocess for fixed update to work with fsms.

Thanks again.

Custom Action wizard doesn't add Fsm.HandleFixedUpdate = true; with Fixedupdate selected.

PlayMaker Help / Re: Why can't prefabs reference scene objects?
« on: July 17, 2016, 08:09:10 AM »

PlayMaker Help / Re: Why can't prefabs reference scene objects?
« on: July 16, 2016, 06:11:30 PM »

I agree, as Unity doesn't allow prefabs to reference scene objects.

how do you send global events?

One way is:
at the end of level 1 > "PlayerPrefs Save String" > Weapon_name = weapon1
at the start of level 2 > "PlayerPrefs Load String" > Weapon_name
"String switch" > Weapon_name > Create object weapon1
PlayerPrefs Save Int for Score.

Another way is
Assign weapon (gameobject) to a global game object and score to global int

PlayMaker Help / Why can't prefabs reference scene objects?
« on: July 14, 2016, 07:20:10 PM »
When I try to manipulate a scene object with a prefab It warns me that prefabs can't reference scene objects and references will be lost on save and load.

To overcome this problem, I'm attaching scripts to prefabs and broadcast messages to fsm's from the script. Is there an easier way of doing this?


Share New Actions / Re: Pooler - Simple Pooling System.
« on: July 01, 2016, 11:33:04 AM »
you're welcome...  :)

Share New Actions / Re: Pooler - Simple Pooling System.
« on: June 30, 2016, 10:50:49 PM »
Thanks. I fixed the problem. Actually it was my fault. I'm using this action in my project I never needed to restart a scene in my game.

When a scene is reloaded, object arrays where spawned instances are stored do not reset but all the spawned objects are deleted because of a reload. I solved it by adding an awake() function which executes when a scene is loaded and resets arrays.

You can download new version:

Thanks again.

Share New Actions / Re: Pooler - Simple Pooling System.
« on: June 30, 2016, 01:59:34 AM »

as for the first line of debug you have different pools with same name. Can you please try to find if there are different pooled objects with same pool name? Also a pool should only be initialized only once. You may be attempting to initialize the same pool twice.

As for the ---"MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object."---

My script doesn't destroy objects but disables them I don't think pooler generates this log. Is this a test scene? if it is can you please send it to me?


PlayMaker Help / Re: Arabic build string
« on: June 17, 2016, 09:41:56 PM »
Thanks for the answer!

I am getting name from facebook sdk and I use
Code: [Select]
result.ResultDictionary["name"].ToString(); so it's strictly a string.I thought It shouldn't matter if it contains numbers as it is converted into string as the rest of the components are ints and floats converted into strings.

But interestingly you are right arabic words seem to have numbers in them. Do you know the reason why this happens?

Will restricting or removing numbers from the name solve the problem? as they are right to left languages, won't it be added to the start even if it is completely a string.

Thanks again.

PlayMaker Help / Arabic build string
« on: June 17, 2016, 01:57:56 PM »

I'm keeping user info inside a single string on my servers and I use build string to serialize this info into a single string such as: id.tostring + score.tostring + name
> 21-1400-Mike

the problem here that it seems like although my game is local I have an user with arabic android device. his order seems reversed.
> Arabletters-21-1400

I checked the code of buildstring, seems straight forward. Are there any Arab users here? Does the arabic version of Unity or Linux sums strings in reverse order? ('Cause arabic is written from right to left in contrast to other languages)

Or am I getting hacked, I wonder :P


Debug Setting located at the Debug bar resets to "Step Single Frame" every time I enter into game mode. It's annoying 'cause I debug so much, and it resets to its orginal state every time. I guess you're working on bigger issues, I hope you fix this too...


PlayMaker Help / Re: Accessing array of c# bools
« on: June 17, 2016, 12:21:56 PM »
There are various ways to interchange and manipulate variables. One way is using "Send Message" to manipulate a value by starting a function.

just define a function in your script.
Code: [Select]
public void myfunction () {
// do something
then you can use Send Message with "myfunction" in method name.

Also you can receive variables with send message
Code: [Select]
public void myfunction (bool mybool) {
To send a bool value to a function just choose bool from parameter.

And to return a value from the function you can use
Code: [Select]
FsmVariables.GlobalVariables.GetFsmBool ("mybool").Value = true;remember to define "mybool" from global variables.

There are other ways, this is just one of them. Also remember to include:
Code: [Select]
using HutongGames.PlayMaker;

PlayMaker Help / Re: how to add force with FixedUpdate?
« on: June 16, 2016, 07:06:09 AM »
Hi jean, thanks for the info...

Actually you are too right, I modified so many of actions it really becomes a problem when updating... I began using custom action wizard anywhere possible (which is a great feature for beginners as well)

By the way he has to change the public class name too or it won't build.
public class AddForceLateUpdate

Thanks again.

Edit: spelling and added last paragraph.

PlayMaker Help / Re: how to add force with FixedUpdate?
« on: June 15, 2016, 06:07:42 PM »
- From project view type Add Force
- Double Click on Add Force (C#)
- Source will display at Line 71 there is OnFixedUpdate
- Change it to OnUpdate or OnLateUpdate.
- File / Save then Build / Build All

but problem here is that rigidbody operations has to take place in fixed update or there will be flicker in the motion.

FixedUpdate should be used instead of Update when dealing with Rigidbody. For example when adding a force to a rigidbody, you have to apply the force every fixed frame inside FixedUpdate instead of every frame inside Update.

Pages: [1] 2 3 ... 6