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

Pages: 1 [2] 3 4 ... 6
PlayMaker Help / Re: Lighting
« on: February 20, 2013, 10:32:12 PM »
Are you making a flat 2D game using something like the 2D Toolkit plugin or are you doing a 3d game locked to 2 axis?

Have you added a light yet and is it having any effect at all on your scene? Also is this a mobile or console/PC game? Lights may behave in different ways depending on the platform you choose and shaders that you are using for your materials.

This question may well be better placed on the Unity forum.

PlayMaker Bug Reporting / Re: PoolManager Actions broken by update?
« on: February 15, 2013, 05:37:17 PM »
Thanks Jean :)

I also noticed that the current PoolManager actions only allow you to spawn from a game object location. Would it also be possible to spawn at a vector? It would be useful for doing things like getting hit location and spawning blood spray. Right now I'm having to get the vector, spawn the blood game object at origin, move it to the vector and then spray the blood!

PlayMaker Bug Reporting / PoolManager Actions broken by update?
« on: February 14, 2013, 05:30:08 PM »
I just started a fresh project. Updated and imported playMaker and PoolManager, then downloaded the custom actions from here:

After importing the actions package, I'm getting this error in the console:
Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtCreatePrefabPool.cs(162,33): error CS0029: Cannot implicitly convert type `void' to `System.Collections.Generic.List<UnityEngine.Transform>'


PlayMaker Help / Re: Create Object
« on: February 11, 2013, 11:41:02 PM »
I'm not sure if playMaker has been updated recently but in the version I currently have, there is a bug in the wait.cs file which may be causing the problem. Try replacing it with this one

PlayMaker Help / Re: Pausing the game
« on: February 04, 2013, 07:18:58 PM »
I had the same problem. My solution was to add a global event for PAUSED and another for RESUME to the FSM which handles device acceleration. The PAUSED event goes to an empty action, so when you hit the pause button you send this event and it rips the FSM out of the Get Device Acceleration action. The RESUME event links to the Get Device Acceleration action, so when you unpause the game you can start taking input again.

PlayMaker Help / Re: Use playMaker global variable in script?
« on: January 31, 2013, 03:27:49 AM »
Thanks Jean, it looks like you may have saved my arse yet again!

PlayMaker Help / Re: Use playMaker global variable in script?
« on: January 30, 2013, 11:25:38 PM »
Hi Jean

I'm getting this error:

Assets/Scripts/GeosophicPostScores.cs(12,21): error CS0029: Cannot implicitly convert type `HutongGames.PlayMaker.FsmInt' to `int'

Also, could you get an int variable from an FSM which is sharing the same object as the script?


PlayMaker Help / Use playMaker global variable in script?
« on: January 30, 2013, 10:37:00 PM »
Hi guys,

I'm trying to work out how I can access a global variable from playMaker in one of my scripts. I'm trying out the Geosophic leaderboards plugin but it has no playMaker support.

So basically, I have an int variable called ScoreCombineAll and I need the int score variable from my script to use that value. How would I manage this?

My expertise with this kind of scripting is... not good.


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

public class GeosophicPostScores : MonoBehaviour {

int score = 0;
int leaderBoardSchema = 401;

void Start ()
GeosophicSDK.PostScore (score, leaderBoardSchema);

PlayMaker Help / Re: setup a scalable GUI with anchor points?
« on: January 24, 2013, 05:08:01 PM »
Well that's a coincidence; I just came here to ask for the same advice. My GUI is designed to be displayed optimally on an 800x480 screen, it uses X and Y world space positions to anchor the GUI to either corner of the screen, with pixelInset to adjust its position from there.

While all my individual elements are positioned correctly, they look very small on high res devices and way too big on lower res ones. I've tried various scripts to correct the problem, but none of them work.

So I too would be interested in seeing a foolproof playMaker solution to GUI scaling!

EDIT: Also, Scale GUI doesn't seem to have any effect on my GUI textures at all. What's up with that?

PlayMaker Help / Re: Smooth value change?
« on: January 20, 2013, 07:48:50 PM »
Not sure about the materials but I have used playMaker to smoothly change light intensity before. Here's what I did to create a pulsating light:
(Sorry, I wasn't expecting it to be this long!)

1. Create an FSM with a float variable to store the lights intensity value. Call the variable lightIntensity and set its value to 1.0

2. Rename the default start node "State 1" to something like AddLight. Drop a Float Add action onto it and set its float variable to the lightIntensity variable you created. In the Add field set a value like 0.05; this is how much the brightness will be incremented by every time the action is visited. Also add a Wait action to this node and set it's value to something low like 0.05; Set a FINISH event for it. The wait will determine how quickly the the light will pulsate.

3. Create another node (Call it ApplyLight) and hook the AddLight node's Finished output into it. Add a Set Light Intensity action to your ApplyLight node and set the Value to the lightIntensity variable. Also add a Float Compare action and set its Float 1 field to the lightIntensity variable; set the Float 2 variable to the maximum intensity you want the light to reach (say 2.0). Create a TRUE event and a FALSE event and add them both as outputs for your ApplyLight node; Link the FALSE output back to your AddLight node that you created in Step 2. Now Add a Float Compare action to your AddLight node and set Equal to TRUE, Less Than to FALSE, and Greater Than to TRUE.

What your ApplyLight node is doing is firstly to apply the lightIntensity value to your light. It then checks if lightIntensity is equal to or greater than 2.0 - if it is not, then it will output FALSE and jump back to your AddLight Node, which will then increment the lightIntensity by another 0.05 before firing the FINISH event back to your ApplyLight node, which will then apply the lightIntensity value to your light and again check if lightIntensity equals 2.0. Once it equals 2.0 it will fire the TRUE event output.

4. Duplicate your AddLight node (call it SubtractLight) and hook the TRUE event output from your ApplyLight node into it. This node works exactly the same as your AddLight node, only this time your Float Add action value will be set to -0.05 to subtract the light's intensity.

5. Finally duplicate your ApplyLight node (Call it ApplyLight2) and hook the FINISH event output from your SubtractLight node into it. Change the Float 2 variable on your Float Compare Action to 1.0 (this is the minimum intensity for the light). Change Less Than to TRUE and Greater Than to FALSE. Here we are checking if lightIntensity is greater than 1.0, and if it is, then go back to SubtractLight. Finally, hook the FALSE event output back to your SubtractLight node and the TRUE event output back to your original AddLight node.

Now you should have an endlessly pulsating light.

PlayMaker Bug Reporting / Re: GameCenter Error
« on: January 09, 2013, 10:47:10 PM »
Awesome!  ;D

Thanks Jean

PlayMaker Help / Re: CreateObject - Performance hit[SOLVED]
« on: January 07, 2013, 03:02:09 AM »
I was initially creating enemies on the fly with CreateObject. You do get a lot of stuttering when you do it this way. I switched to PoolManager - problem solved!

It's easy to implement, especially with the custom playMaker actions. You set up an object in your scene with a PoolManager component, then specify which prefabs you want pre-loaded in the pool. Then you can pretty much spawn your prefabs like you would with CreateObject, only without the performance hit.

The most difficult thing I found is that you need to manually reset your prefab's behaviours before respawning it. Because the prefab is being recycled rather than destroyed and recreated, it will be added back into the scene in the state it was in before despawning.

So if you did something like disabling a collider, you would have to make sure to turn it back on yourself.

PlayMaker Help / Re: AI Health system
« on: January 05, 2013, 07:28:06 PM »
Make an FSM for your enemy prefab to handle damage and create a private int variable in that FSM (from the main playMaker editor window, not the global window). Each enemy will have it's own health pool if you do it this way.

General Discussion / Re: Playmaker Sucks
« on: January 03, 2013, 04:51:59 AM »
Haha, well played!

If you don't like playMaker... you're doing it wrong!

PlayMaker Help / Re: Events fired near initialization time
« on: January 03, 2013, 04:14:02 AM »
Have you tried pausing the game after all your FSMs have fired and stepping back through your states to make sure everything has worked as it should?

I usually try to avoid any situation in scripting where something is fired multiple times on the same object, in the same frame. You run the risk of having the first event being stomped by the second before it has a chance to finish what it was doing; then unpredictable stuff starts happening. I'm not sure why adding a .1s delay would change this, though...

If the above is the case, you could try creating a separate FSM2 for each of your FSM1's to send an event to; do a Send Event to Game Object FSM (don't use Broadcast All if you are using the same event name for each FSM).

Pages: 1 [2] 3 4 ... 6