Results 1 to 2 of 2

Thread: Making a fireball appear after a certain subimage has passed

  1. #1

    Default Making a fireball appear after a certain subimage has passed

    Hi all, I am trying to make a fireball come out my player near the end of the animation the player does when firing a fireball, sub image 21 I think, how can I get it to check this then fire ?


    Code:
    if sprite_index = spr_mefireballR and image_index = image_number - 21
        
        with (instance_create(x, y, obj_fireball1))
    {
        speed = 5;
        direction = 90;
    }
    I have tried a few things but nothing has worked.
    "Where does any man go for one last desperate roll of the dice" - 47 Likes to gamble!

  2. #2

    Default

    Is this GML?

    I'm no expert but try this

    Code:
    if((sprite_index = spr_mefireballR) and (image_index = (image_number - 21))
    {
    instance_create(instance.x, instance.y, obj_fireball1);
    }
    then set your speed and direction for the fireball in its creation script?

Similar Threads

  1. Sprite subimage (*) has a greater height on disk than expected...
    By Yeti in forum T2G Artist and Animator, General Discussions
    Replies: 2
    Last Post: 09-02-2014, 03:08 PM
  2. Passed my TMA
    By BigGreenDave in forum T2G Artist and Animator, General Discussions
    Replies: 2
    Last Post: 11-08-2012, 01:34 PM
  3. after i passed the course
    By cliveo5o in forum T2G Developer, General Discussions
    Replies: 4
    Last Post: 03-13-2012, 08:56 AM
  4. TMA 4 - Passed but only just
    By Liz in forum T2G Artist and Animator, General Discussions
    Replies: 18
    Last Post: 11-12-2010, 08:57 PM
  5. passed
    By coxyboi09 in forum T2G Artist and Animator, General Discussions
    Replies: 10
    Last Post: 08-12-2010, 08:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •