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

Pages: 1 ... 5 6 [7]
91
I want to make a chase scene in a sidescrolling game. I am controlling one character, and the other character is supposed to chase me (using Move To). If I run fast, the chaser stays behind and goes off screen. And then it freezes, and stops chasing me. If I go back, so it's on screen again, it unfreezes and chases me again.

The chaser is NOT a skinned mesh. It is just an empty object with capsule collider and a rigid body.

I guess Move To action doesn't update the object's translation if it's off screen? The other probable cause is that the rigid body, which is attached to the collider of this empty object, somehow freezes the whole thing, when it goes offscreen maybe?

How can I make it ALWAYS update?

92
Action Requests / Save/load all variables to playerprefs action
« on: November 27, 2012, 04:57:38 AM »
How about an Action for saving/loading all playmaker local and global variables values to disk? It can be totally generic, but it would save a lot of time on making cutstom playerprefs keys and all for let's say 150 variables. Like a savegame, but limited just to playmaker's variables to make it easy.


Example:
Player has variables like: amout of ammo, amount of health, armor, stamina, strenght, speed, max jump height etc. They get changed during runtime. If player hits "save game", the amounts get saved on disk with Save all Variables action. He restarts the computer,  and hit's "load game" - We use actions "Load all Variabls" and then "Load Level".
This would make a lot less thing's to worry about, what's left is player's position on the level, etc.

I know the rest of variables would be saved also (for example Axis values or velocity or whatever), but it would be no problem most of the time. Or solved by choosing the variables that you want to make playerprefs for, or masking the one that you don't want to save).

I'm saying PlayerPrefs is a b**ch, if you don't know how to program, and Playmaker is exactly for people that don't know how to program. Or don't like to program... same thing :)

93
Playmaker Help / Re: Unity 4 - error pause all the time...
« on: November 22, 2012, 01:37:54 PM »
Ok, I worked it out somehow. Apparently the healthbar (a plane, parented to the camera, which I scaled with Set Scale action if Player lost health) was causing all these problems. I got rid of it, the errors stopped.

I can't tell I'm smarter now though... this plane did not have a rigid body component, did not have a collider component. And the console spit out errors like crazy, saying that practically every object on the scene doesn't have a tensor.

Anyway, thanks! It was a character setup error apparently.

94
Playmaker Help / Unity 4 - error pause all the time[SOLVED]
« on: November 19, 2012, 10:50:22 AM »
Hey!
I just switched to Unity 4 with the newest Playmaker. What I discovered right away, is that almost every setup that is bigger than 3 (or so) object with 3 state machines gives strange errors. It also pauses the editor. You can't turn off the error pause. It pauses anyway, whether it's on or off.


Most common errors are the ones in attached jpg. (I checked, those make no sense: "Compute mesh inertia tensor failed (...) supply a tensor manually". On every object in the scene, rigid body or not.)

I thought my Playmaker character setup from Unity 3.5 was wrong somehow, so I started doing the character from scratch in Unity 4. Everything was working fine with no errors in editor, until I got to the point when I used SmoothLookAt Action on the head of the character. ERRORS, endless errors and game pauses right away. I deleted the SmoothLookAt, because it worked fine before. Still nonsense errors.

Btw. the game runs fine and smooth if you make a Build. It's just the editor.

95
Action Requests / Raycast with store Hit Point every frame
« on: November 17, 2012, 01:15:53 PM »
Hey, what about this Raycast with storing the Hit Piont right away, every frame? Get Raycast Info doesnt do the trick, since it's just once and gets whatever raycast on scene. I'm trying to do an "invert mouse pick" in TPP game.

Cursor will be actually going in the proper direction. I'm Getting the local XYZ of the object that follows cursor. Then, I'm multiplying Y by -1, and Setting the position of the other Object to XYZ. So far works great, looks like invert mouse. The second Object will raycast every frame... and I need to be able to get hit point every frame, to move the Crosshair to that point. Strange request, but there are still people who like their cursor going up, when they move the mouse down... (but only in game! Menus should be normal)

Actually... Invert mouse option in Mouse Pick action would be even better for this case. :) But still, I'll probably need what I wrote above at some point, to do other things with raycasts, like spawn decals or something.

Thanks!!

96
Playmaker Help / Angle to Target (enemy always facing the player)
« on: July 09, 2012, 07:20:17 AM »
Hey!

In sidescrolling platform game, I want to make the enemy play 'turning in place 180deg' animation, whenever the player is behind it. I figured I'll use Get Angle to Target.

The problem is that something doesn't work or I got something wrong. The float Angle2Player is always 0, and doesn't change at all during gameplay, regardless of where the Player is (in front or behind the enemy that has this script). Did I do something wrong or is it a bug?

See attached image.

97
Action Requests / Re: Translate object to target with choosing axis
« on: July 09, 2012, 02:10:51 AM »
First solution seems better for now, since Set Position gives a glitchy/flickering effect sometimes. It "teleports" the object instead of smoothly translating it (at least it looks that way).

98
Action Requests / Re: Translate object to target with choosing axis
« on: July 09, 2012, 02:00:48 AM »
Awesome!!! Thanks a lot for fast reply!

99
Action Requests / Translate object to target with choosing axis
« on: July 08, 2012, 11:16:14 AM »
I would gladly see something like Move to Target, but you should be able to pick certain axis. Right now you can only turn off vertical i think.
It should work like this script:

transform.position.z = Mathf.Lerp(transform.position.z, target.position.z, 0.5);
transform.position.y = Mathf.Lerp(transform.position.y, target.position.y, 0.5);

Basic use would be doing a camera follow a character in 2D sidescroller for example, but only in certain axis, with slight delay, without rotation.

Pages: 1 ... 5 6 [7]