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

Pages: 1 ... 41 42 43
631
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

632
Resolved Questions / Physical collisions with zero gravity [solved]
« on: December 28, 2014, 02:36:01 am »
Hello,

I'm making a vertical 'shooter' type game like the old-style Commando game.  I want the Actors to be able to collide with the Player as when they do, they then attack i.e with a sword.

If I have an enemy actor not moving and the player runs into him he currently flies off screen because there is no gravity.  How do I allow physical collisions in this style of vertical game so they rebound a little  without flying off into space?

Thanks

633
Resolved Questions / Re: Enemy actors swinging weapons on player collision
« on: December 28, 2014, 01:24:14 am »
Fantastic!! Thank you very much for your help!

I created an Actor Attribute - 'Each_Sword', then once the 'Create Sword_Type' instance was run, set the 'Each_Sword' attribute to 'Last Created Actor.

Then used that 'Each_Sword' Actor Attribute in setting the x,y of it in accordance with the Knights.

I've now edited the code slightly as I want to only create the Sword upon collision, and not when the Knights were created, how would I do this?    I'm guessing I need some kind of blocker in place to only create one instance?  So I have created that in the image below, but this is not playing the full loop animation of the sword swinging- it's just making it flash as if it is re-running the create/kill instances over and over again.  But it is appearing upon collision now and tracking each respective knight.

EDIT: If I take out the 'Kill Sword Instance', then it does the full loop but for lots and lots of swords so I figured If I 'Kill Sword' at the end of it's loop maybe this would work.  I only know how to 'Do after x secs'.  (Which kinda worked), how do I tell it to do something at the end of it's animation loop?

UPDATE: I used an 'is animation still playing' to determine when to kill the sword, which worked a treat BUT the sword only recreates for one instance of the knight?  See code below.  (Thanks)

634
Resolved Questions / Re: Enemy actors swinging weapons on player collision
« on: December 28, 2014, 01:02:11 am »
Thanks, that makes sense.

I have created a new Actor Type Attribute - 'Knight_Sword_Type' and chosen the Actor Type of Sword as it's default value, and selected this through 'Create' instance, that works.

Though I'm getting unstuck with the Actor Attribute for making them follow the Kinght.  I have also created the Actor Attribute, 'Knight_Sword_Ind', but I don't know how to link it to any particular actor.  I have selected it as a replacement for 'set x to x for 'last created actor',  but at the moment I think it is just an empty attribute not linked to anything as it's crashing the  game?  How do I link this to my newly created Actor Type?

635
Resolved Questions / Enemy actors swinging weapons on player collision
« on: December 27, 2014, 04:23:18 pm »
Hello,

I'm very new to Stencyl.

I am trying to set up 2 enemy actors (Knights) that chase the player using 'Follow Target' behaviour.  When they collide, I want another actor, Sword, to be created and to play the animation of it swinging.

To achieve this, the best I have managed is when the enemy actor is created, to also create the Sword actor under an idle animation placed upon the x,y of the Enemy.  This sword then follows the enemy actor around screen.

The problem I am having is the actions of the created Sword actors all activate in unison, if 1 swings upon collision with the player they all do.  Also, because they are linked to the Enemy Actors created and following 'Last Created Actor' only 1 Sword tracks their respective Enemy Actor, the other stays still.

Ideally, I want to create a scene with multiple Knights that chase the player around screen, upon collision they swing a sword (Not to be shown til this point), when there is no collision, there is no Sword.  I'm trying to do it this way to learn so I can have various Actors / Player picking up new weapons along the way without redoing lots of Artwork i.e Zelda Dilemma.

Thanks

Pages: 1 ... 41 42 43