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

Pages: 1 ... 8 9 [10]
PlayMaker Help / Re: Gun recoil / kickback
« on: November 28, 2012, 02:13:02 PM »
would making the camera rotate in global space instead of local solve the issue? my logic is that the camera rotation then wouldn't be affected by the empty GO (camera would still see the recoil and jump up but it would then actually rotate up on its x axis to look up, rather than rotate the actual axis itself to look up, yeah?

As always, your help is soooo appriciated <3

PlayMaker Help / Re: Gun recoil / kickback
« on: November 28, 2012, 02:09:23 PM »
Hey! :) I added an empty GO as parent to the camera and added the recoil in x axis in local space for it

It all looked to work exactly as i wanted until i let it recoil to the point where the camera edge was rotated with the empty so far back that it couldn't look down to see straight ahead (the rotation of the camera "followed" the empty - so if empty rotated 10 up on X axis - the new point i was looking at was now "straight ahead" for the camera - so when too much recoil has been done, the axis is so far back looking straight into the air is known as "normal straight ahead look" for the camera, which means there is a limit as to how for down i can aim with the camera so i can't see straight anymore =( any ideas on how to solve this? my camera and character is from the standard asset 1st person controller BTW :(

PlayMaker Help / Re: Gun recoil / kickback
« on: November 28, 2012, 01:34:21 PM »
got it, will try this out! thanks :)

PlayMaker Help / Re: Gun recoil / kickback
« on: November 28, 2012, 10:48:19 AM »
Yes, it's an FPS project for school - What im trying right now is an iTween rotate on the camera indeed - but it won't do anything =( I've looked through the states and it goes to the state successfully when i shoot but it won't rotate the camera

Could it have something to do with the fact that camera is locked to the mouse cursor?

PlayMaker Help / Gun recoil / kickback
« on: November 28, 2012, 10:29:53 AM »
Hi guys! I've been messing around with gun recoil and have been trying to add rotation to my camera when the player fires a bullet, but can't seem to make it work - do you guys have any idea why it won't rotate? I read on the unity forum a guy suggesting to make a sandwich for the camera, but im not really sure what he's talking about

Sorry if this is a noob question, but im still quite new to playmaker, and the search bar came up with nothing =/

Thanks in advance - koztheboss

PlayMaker Help / Re: Raycast stops after hit event
« on: November 27, 2012, 05:46:36 PM »
As Jean said, or if it's a local on hit event that is called, i guess you could simply copy the ray cast action and put into the next state, so when ray cast hits something and goes to a new state, it will start raycasting yet again :)

Thanks alot Jean, I will take a look at it! :)

Hi Jean :)

thanks for taking your time to find these for me. I  have already done a search, and so i have already read those posts withoutmuch luck :(

What i need is not a way to display health bars on the gui - what i need is a way to track what target my bullet hit and then take health from Them. I have tried making a local var on the enemy prefab for health and setting it to 100. Then my bullet does a Raycast and checks if the object hit = "zombie" and if its true then stores target GO in a variable and sends event to that zombie to lose 25 health (which is done on the zombie prefab)

This sounds to me like it should work but it doesnt :(

So what i need is to cd able to have 10 of the same zombie spawned and be able to track health and hits on each one individually

Any help or pointers could get me going, but i cant figure out how to do it myself Even after 10th+ hours of trying :<

Bump, still hopeless and helpless =(

PlayMaker Tutorials / Re: A Sharing FSM thread?
« on: November 26, 2012, 01:14:26 PM »
Hello all :) I'm totally new to playmaker and just stumbled upon this thread and saw the prefabs that red posted a good while ago. I got so happy as the prefabs he posted are exactly what i can't  make work myself, but then again got saddened seeing that the links are dead =( Please mr. Red, is there any way you can re-upload some of the prefabs? specifically the shooting one and the weapons handler one that lets you swap between up to 6 weapons? :) lotsa love! <3

So I'm having a problem where all my enemies share the same health.

I have a prefab called zombie. When the game first launches a global variable called zombie_health is set to 100.

When a zombie spawns, and i shoot at it, the game will retract -25 from the zombie_health. When zombie_health reaches 0, the zombie will destroy itself

When i spawn more than one zombie, they obviously share this one variable and thus all have the same health and will all die when health reaches 0 - also, shooting any of the zombies will retract health from the variable, so i can have 4 zombies and shoot each of them once and they will all die

I have been messing around with possible solutions for a couple of hours but can't find one that works..

Any of you geniouses have any idea as to how i can spawn a zombie and assign to it a unique health bar, and track damage to that specific zombie?

Right now the tracker is a ray-cast from the bullet that saves object hit as a variable. It then compares the variable with the word "zombie", so it checks if target hit = zombie and if it is, it will do 25 damage to the zombie_health variable

Any help is greatly appriciated.


A few hours later now, and i've tried giving the zombie prefab a local variable called "my health" and then when 10 zombies are in the game, the bullet would save "object hit" in a variable, which would then trigger an event to that specific zombie to fire it's event "take damage".. But I can't make a send event like that because i can't reference the specific zombie - the "target hit" variable doesn't work =(

There must be a smart solution for this - Am I just too narrow-minded to see it right now?

Any help appriciated - this is doing my head in =(

PlayMaker Help / Re: Compare int is behaving weird
« on: November 25, 2012, 09:59:23 AM »
thanks a ton :) yes that took care of the problem with it not registering changes, thanks so much! :)

PlayMaker Help / Re: Compare int is behaving weird
« on: November 25, 2012, 08:25:31 AM »
damn, my bad hold on, updating


Images updated, thanks for sticking with me :)

PlayMaker Help / Re: Compare int is behaving weird
« on: November 25, 2012, 08:14:23 AM »
Here are screenshots of the entire thing:

Player state 1:
(gets the owner of the FSM and puts it in a GA variable) (this is used for the zombie to track and move towards the player)

Player state 2:
(goes to listener and waits for health to be = or below 0, where after it should move to state 3 and destroy the player)

Player state 3:

Health Manager state 1:
Sets the player's start health of 100 and saves itself in a GA variable (for the zombie to send the damage event when it hits the player)

Health Manager state 2:
Converts current health to a string and displays on the HUD

Health Manager state 3:
Waits for the zombie to send the retract health transition

Health Manager state 4:
makes a -25 change to the health int and goes back to state 2 where it updates and displays the new health value, then goes back to listener again

Zombie state 1:
the zombie has a trigger around it, so when it reaches the enemy it goes to stage 2. In this stage there is also a tween, making the zombie move slowly towards the player

Zombie state 2:
Send event to the Health_Manager to make a -25 change to the player's health int

Zombie state 3:
Wait 1.5 secs before you start chasing the target again (this also prevents zombie from doing damage more than once every 1.5 seconds) this is a temporary solution and will be replaced with a zombie hit animation instead


No i'm not checking every frame, and the health int works fine in itself starting with 100 hp and retracting 25 every time the zombie hits - the problem is in the player state 2 where it compares the int with 0 and it doesnt work even though i can see the int changing to 0 the compare doesn't register it.

It works if i make the compare be 75 and the comparison being above (it will register the hp is 100 which is above 75 and will then successfully destroy the player) but it wont register "equals to" or "below" =(

Any help is greatly appriciated

PlayMaker Help / Compare int is behaving weird [SOLVED]
« on: November 25, 2012, 06:57:09 AM »
so I'm making a prototype for a school project - so far i have the enemies chasing the player, and when they come close they retract 25 health from the health Int which is then updated with the new health, converted to a string and displayed as a GUI TEXT - all of that works fine, but i now have a listener that has a compare int action that compares the health int to 0, and if it is equal to or below 0 it will go to next state which destroys the player.

The weird part is that it doesn't work. Not just that, but if i set it to compare to 100 (what the player starts with) it works like a charm and instantly kills the player when the game starts. If i set it to 200 it also works (because starting value 100 <= 200)

If i set it to 75 it doesn't work - the health will just go to 75 and below and not kill the player, but if i switch compare from <= to >= it works again (because 100 starting value => 75)

Any ideas as to why it wont compare the int to 0 or 75 for that matter? seems like equals to or less than only works when i set it to more than the starting value of the player health :(

Pages: 1 ... 8 9 [10]