Spreading bullets around - possible in Construct 2 now?

This forum is currently in read-only mode.
  • Hi, I have tried playing around with Construct 2 a bit. I have never touched Construct 1 though, and I am aware that Construct 2 is still under beta development.

    So the thing is this, right now, I want this simple thing written in the pseudo code below but I am not sure whether it is possible yet:

    //a bomb explodes and spreads bullets in all directions.
    for (int i = 0; i < 360; i += 10){
        GameObject *createdObject_ID = createObject(bullet, thisObject->getX(), thisObject->getY());
        createdObject_ID->setDirection( i );
        createdObject_ID->setSpeed( 3 );
    }
    
    [/code:22a3zi2c]
    
    So is it possible in Construct 2 now or not? Am I missing something? What should I look for in the event sheet?
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes it is possible, and then events will look practically the same as your pseudo code. How far were you able to get?

  • Well, I was looking around for a drag and drop object for "loop" or the like, but I'm a complete newbie in here, and I am not sure which goes where yet. In other words, I don't know how do you do this? I got all the source code in my head, but not sure how to pull it off exactly in Construct 2.

  • When adding events the "for" loop is under System.

    Here is a capx:

    http://dl.dropbox.com/u/5426011/c2/360shoot.capx

  • Thanks for the code, R0J0hound. That clears up lots of things. At first, I thought there can only be one condition.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)