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.


Topics - Northfield82

Pages: 1 ... 12 13 14 15
196
Ask a Question / Help with behaviors and passing attributes
« on: January 07, 2015, 04:58:37 am »
I am trying to set up behaviors for my game and have:

Enemy Health - Attached to Actor = to knock energy off / kill enemy actors
Quasi_Weapon - Attached to Actor = has no code, just a 2 attributes to determine current weapon and damage points associated
Fire Weapon = Attached to Actor = to fire the bullets of which is current weapon

When the player actor collides with the icon (actor) for that weapon, it assumes it as 'current weapon' and puts those attributes into Quasi_Weapon

The problem I have is upon the Enemy Actor detecting collision, everytime I try to retrieve Damage_Points from the Weapon Behaviour to know how much to deduct it says behaviour not found.  I take it this is because this behaviour is attached to Player Actor and not Enemy Actor.  I'm totally stuck on this and can't figure out how to do it.

How do I get around this?  Please help, it's driving me insane!!!

197
Resolved Questions / Booleans not always setting...
« on: January 06, 2015, 02:33:57 pm »
Has anyone had trouble before with Booleans not always setting?  I think this seemsto be a problem if they are contained within a Do_After (say .2 secs). 

For example if I have a block in there to limit the rate of shooting.  It'll set the 'Is_Firing?' Boolean back to false 90% of the time and work fine, but on the odd occasion it seems to miss it and so never releases itself.

Cheers

198
When detecting hits and collisions for decrementing health points and killing off enemy actors, is it best to set up a separate behaviour to do this? or just have it under the Events for that specific actor?

if the former:

Would that be a behaviour attached to Scene or Actor?

199
Ask a Question / Sometimes Enemy Actors go Invincible...sometimes
« on: January 06, 2015, 12:55:48 am »
I have a bit of a problem where ,my enemy actors (knights) seems to go invincible, it tends to only be 1 or 2 and is random in which one(s) it happens to.

The enemy actors have 3 Health Points, with 1 getting deducted each time they are hit.

I have a flag / block which for .2 secs makes them invincible for a short period after the first hit to stop all the health points being decimated instantly.

Any ideas why this could be happening?

Thanks

200
Ask a Question / Player not shooting diagonals (apart from down-left)
« on: January 04, 2015, 07:16:01 am »
For some reason my player actor will not shoot diagonals, apart from down left.

Any ideas?

201
Ask a Question / Is making a game like this possible?
« on: January 03, 2015, 02:29:16 pm »
An old c64 favourite of mine!

https://www.youtube.com/watch?v=em553coKuqA

Just wondering if it would be possible to make with Stencyl, and what would be the best way to go about it?

The skater stays central to the screen and it's almost as if you're actually controlling the road rather than the player (apart from when you make him jump or pick up a coke)

202
So in my game I'm using Follow Target behaviour from Stencyl to get the Enemy Actor to chase my main character.  This behaviour is attached to my Knights.

I'm then retrieving the direction attribute of 'The Target' from the follow target behaviour to set the velocity and direction of which way the knights throw their hammers.

In the game this is working fine, but in the debug screen I'm getting this warning up:

 Level:     INFO
When:      2015-01-03 11:45:00
From:      stencyl.sw.app.filewatcher.ExternalAppLauncher

[Flash] com.stencyl.behavior.BehaviorManager#getAttribute(128): Warning: Behavior does not exist - Follow Target

Any ideas?

203
Ask a Question / All actors being killed when one leaves screen
« on: January 03, 2015, 12:59:34 am »
I have the code set up so that when an actor (Enemy Hammer) leaves the screen, that actor is killed off and a flag is then used to tell the Knight actors they are ready to fire again.

My problem is when one Hammer leaves the screen and the 'Kill Enemy Actor' block is run, it is killing the on screen Hammers too.

How do I stop this from happening?

Cheers

204
Ask a Question / Actor not being 'created' but only 'entering scene'?
« on: December 31, 2014, 11:20:12 am »
Is there a reason why an enemy actor wouldn't register 'when created' but does with 'when enters scene'?

Surely it has to be created before the scene starts?...I don't get it.

205
Ask a Question / The theory behind structuring health points?
« on: December 31, 2014, 04:46:34 am »
I am struggling with trying to implement a health points system for my enemy actors.

My issue is I don't know how to structure the code:  Do I code it under the Scene, Enemy Actor , Player Actor, or Players Weapon Actor?  Or do I spread it across a multiple, i.e , setting health points under Enemy Actor, detecting collision under Player Weapon, or set up a behaviour attached to the scene?

With the current set up, all enemy actors are sharing 2 health points.  They need to have 2 health points individually.

UPDATE: I tried the suggestions below but still having no luck

If someone could explain the theory behind getting this to work that would be much appreciated.

Thanks




206
Resolved Questions / Detecting Scene regions for Actors [solved]
« on: December 30, 2014, 09:20:17 am »
I have created a small region in my scene called 'Bridge Region', when my Player Actor moves into this scene I having debugging to Print 'here' so I know he has been detected.

I am having trouble figuring out how to detect regions from outside the Scene coding though.  For example:

I have a few enemy actors set to a 'Follow Target' behaviour, but I'm only wanting this to active when the Player Actor steps into a certain region.  How would I go about this without setting up a global variable to pass between Scene / Actors.  (I wish I could just use global behaviours everywhere!!)

Thanks

207
Ask a Question / How do I Z-Layer actors on screen?
« on: December 30, 2014, 06:08:56 am »
I have a Knight swinging a sword created as separate Actors, depending on whether the Knight is facing Up or Down I'm looking to layer the sword so it shows on the correct side of the Knight.

I've been playing with Z-layering blocks but not having much luck. In my Scene I have 4 layers with game characters on layer 2

With the current set up, the sword flashes on and looks like it is in the correct position but keeps flashing on and off
Any ideas on how to achieve this?

Thanks

208
I have a 'heart.png' to represent a players 'life'

I have set up 'heart_life' as an image attribute which 'heart.png' is attached to.
I have then set up 'life_instance' as an image instance to draw the image on screen.

I am wanting to display this 'life_instance' 3 times if Player has 3 lives (all next to each other), then twice once he loses a life, and finally once.

When I try and do this, it only displays the position of the last 'attached life_instance'.

How do I display multiple instance of the one image instance?

Thanks

209
I am wanting to pass an  Attribute (Health points of Player Actor) to the Scene so I can display it as a number on the HUD.

The player health starts at 10, every time he gets hit, it decreases by 1.  This I have done, now I just want to pass that number to the scene so it can be drawn on screen (updated on the HUD).

210
Resolved Questions / Instance of actor not re-creating [Solved]
« on: December 28, 2014, 04:38:56 am »
I have created an Actor type 'Knight', which when collides with my Player Actor, a 'Sword Actor' is created for the Knight and an animation is played of the Sword swinging.  I am using an 'is animation still playing' to determine when to 'kill the Sword' so only one instance is created and it disappears once the animation loop is finished (if there is no longer a collision). 

The problem I have is the Sword Actor only re-creates for one instance of the Knight Actor. It re-creates fine over and over again for the other Knight, but of one of the Knights, once the Sword Actor is killed it doesn't return. (2 Knights are on scene)

See code below, thanks

Pages: 1 ... 12 13 14 15