rinesjoseph's Recent Forum Activity

  • Hey I'm back with another question. If you ever played God of War or Devil May Cry you noticed that you can switch weapons in game, well thats what im trying to do but ran into a bit of a snag.

    Now I'm trying to use an array because for some reason when i try and use a container my game crashes. and I already set up an global variable that I can compare with the index of the array. ex. weaponTracker = 1 which is the 2nd weapon in the array.

    My problem is I don't know how to switch that 2nd weapon with the 1st weapon, which would make the 2nd weapon in use instead of the 1st (primary).

    how do I allow the player to switch weapons ingame using an array that holds references to other weapons.

    Please and thank you for helping me with this problem. I know their is a simple way of doing this but it eludes me as of right now

  • Hey I read up on containers and yes it sounds like VERY valuable information THANKS Linkman2004. MadSpy thank you for the test I see the error in what I was trying to do THANK YOU BOTH!!!!

    Anyone with this same problem, do what both of these members suggest. It helped me

  • I'm going to give containers a shot, I remember using families but never thought of containers MadSpy I'm giving your test a run now thank you

  • Ok so I am trying to spawn an enemy that is made up of five different sprites. Body, Two hands, a shield and a sword. I thought if I spawn the body and when the body was created I spawned the hands and the hands spawned the weapon everything would be good but for some reason they all spawn on the one spartan enemy.

    How do you properly spawn an enemy that is made up of multiple sprites.

    I would upload pictures but I dont how to yet lol sorry but if you understand my question HELP would be appreciated greatly

  • You could use the pathfinding behavior but I was scare to personally because I didnt know how much it would take from the performance of the game because i want to port this to mobile. So if you want to get this to work with the pathfinding behavior then go ahead

    #EnemiesConvergeOnPlayer #MakingPlayerFocialPointOfEnemies

    (I dont know how to tag this in the search for other people looking for a similar solution if you know please do so because this could help someone)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found a solution to my problem and if anybody needs help with this here is what I did to fix my problem.

    The Problem: I wanted my enemies to go in the direction of player at all times. The problem with the bullet behavior is that if I set the angle of motion it effects all the of the spawned enemies of the same name. (if I spawn the samurai and set its angle of motion to 180, all the samurai went at the motion) This isn't converging on the enemy because they are spawn on both sides

    Solution: It seems so simple now. What I found out is that if you make an event that with the enemy class you want to target, and you select "is clockwise from" in the angle section. (Focus on making the enemy/sprite you want to go left cause by default the bullet behavior sends a sprite right)

    Depending on your game this part might be a little different but, when it asks for an angle input the MAIN CHARACTERS OF YOUR GAME X position. This part distinguishes what enemy you are talking about. (Which enemies are clockwise from player.x? ok them, now what do we do)

    lastly you have to make sure your only affecting the enemies on that side by adding a condition. the condition I used compare the X coordinates of the enemies and the player. With construct 2 the X coordinate increases from left to right, AND i want to target the enemies are the right of the player, SO if the enemies X is Greater than the player's X, THEN set the bullet motion angle to 180 degrees.

    * only bug i found with this approach is that the enemies that are coming at the enemy from the left, will double back when their X becomes greater than the players X, which kind of looks silly, but if I "Fix" it will yo-yo the other's back also so I'm leaving it and design around it. IF you guys think of a way to fix it then go ahead

  • Thanks Im going to give it a try

  • How I do I say when (whatever) is created go to the direction of the player.

    Im trying to spawn the same enemy on both sides of the enemy that converge on the player. I tried the angle(self.x,self.y,player.x,player.y) and I'm not getting the behavior i want. they end up slanting above the ground or something. Also I don't want the enemies too float off the ground I want them to stay on whatever ground I spawn them on (depending in on the level design of course). I just need them to know. Ok I was spawned, player is X direction, set bullet of motion to X direction. PLEASE HELP ME its such a simple problem that I don't know the answer too and its holding up my hold project.

  • I thought that behavior was for patrolling but now I think about it (now that you mention it) that might just be crazy enough to work lol thanks

  • I am making a survival type of game except the enemies run towards you and you have to defeat them before they defeat you. (I plan on porting it to the mobile platform but that later)

    What I want is for the player to run onto the screen, and once he becomes a certain distance from the player he starts throwing projectiles. I can get the enemy to work when the enemy is on the right side of the player, but I'm trying to have enemies spawn all around the player.

    How do I make the player the object that the enemies base their position off of on either side of the player, then stop and attack. (I got the attacking part, just running on to the screen and stopping from either side is where I'm stuck)

    Thank You

rinesjoseph's avatar

rinesjoseph

Member since 18 Jun, 2014

None one is following rinesjoseph yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies