antrax's Forum Posts

  • 5 posts
  • thank you Mr E Bear, i realy liked the poem metaphor.

    i kinda figured stuff out.

    s608.beta.photobucket.com/user/adamrain/media/13267_zps98206b7e.png.html

    one of the mods told me rtfm so i kinda did,also used faq about homing missiles.

    about cooldown its timer based,ill try to see how it works.

    i realy want to upload the project file so everyone can use it(like i did in flashpunk all my code is free for all).

    (i can use my own servere but would like to upload to some scirra db).

    isnt pasodo code is based on logics? thats what you meant?

  • *to make things simple i need that turret object can shot enemies within range (range is a turret var).

    *and how do i upload my cpx to scirras db?

    because i did make a waypoint system for enemy waves and want to share it.

    if there's a way for me to learn how to convert my code into events i will be happy for advice about that.

    it will be cool to have guides for programers to convert there code to events.

    thats the orignal game i started to make with flashpunk:

    yoelscripts.cowhosting.net/flashpunk%20_source/td.swf

    thats the code:

    private function obtainTarget():void
              {
                  ?if (!active1) { return;  };//exit//if not active do nothing
                  ?//trace("bla");
                  ?var _loc_1:Array = null;
                var _loc_2:int = 0;
                  ?var targ_enemy:enemy = null;
                  ?
                  ?
                  ?shot_delay_count += FP.elapsed;;
                  ?if (shot_cooldown < shot_delay_count)
                  ?{
                        //new array
                        _loc_1 = [];
                    world.getType("enemy1", _loc_1);
                    _loc_2 = 0;
                        
                        
                       while (_loc_2 < _loc_1.length)
                    {
                             //trace("in");
                        targ_enemy = _loc_1[_loc_2] as enemy;
                             //trace(distanceFrom(targ_enemy, true));
                        if (distanceFrom(targ_enemy,true) < range)
                        {
                                ??//chack target type if not the same stop or if all target typs shot
                                ??if (targ_enemy.type_enemy == target_type || 
                                ??targ_enemy.type_enemy =="both") {  }else{break;}
                                ??//SFX.towerShoot.play();
                                ??//create bullet
                                ??//trace("shoot");
                                ??world.add(new bullet(x,y,speed_shoot,dmg,twoer_type,1500,targ_enemy));
                                ??break;
                        }
                        _loc_2 = _loc_2 + 1;
                    }//end while
                
                        
                        //reset shoot cooldwom
                        shot_delay_count = 0;
                  ?}//end count delay     
                  ?
                  ?
              }//end obtainTarget
    [\code]
  • thank you for your help i updated. your example was most helpful.

  • it didnt let me open it because i have an older version of c2...

    thats what the error says.

    if they had a coding language you could of given me a code snipit

    any chance for a good screenshot of your events?

    thank you.

    btw any advice about oop its hard for me to get used to working witout it...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • like hp text.

    ill show an example in a a game i made once:

    yoelscripts.cowhosting.net/flashpunk%20_source/zombie/bin

    a text box that follows the enemy character and shows how much life he has.

    also any advice on how to get in to all this?

    im used to oop as3 flaspunk devlopment (and php opp and python etc...)

    how dose all this works here?

    c2 has a lot of adventges and things i dont know how to do alone...but it also lakes the coding im used to...

  • 5 posts