MPPlantOfficial's Forum Posts

  • > Hey, unxcellent I've figured out the New local storage system however I don't have my files right now so I can't upload. One Workaround you could do is look for OLD WEBSTORAGE CAPXs and build your game over those. They are much much easier to use.

    >

    When you inset a new object, right click on the background of the pop up window and select "Show Deprecated Plugins". I prefer Web-storage myself.

    Oh I didn't know that. Somehow I just assumed the old one was merged with the new one.

    Thanks for letting me know!

  • Hey, unxcellent I've figured out the New local storage system however I don't have my files right now so I can't upload. One Workaround you could do is look for OLD WEBSTORAGE CAPXs and build your game over those. They are much much easier to use.

  • Hey kfglkfgl, first, create the Skidmark images.

    Next, create an ImagePoint on your car sprite where you want the Skidmarks to appear.

    Now you can easily create your skidmarks by using something like:

    If Player is accelerating >>> spawn Skidmark at Imagepoint(1)* at layer

    [player layer -1]**

    On Skidmark is created >>> Set Skidmark.Angle to Player.Angle ***

    *or whatever the number of the image point.

    ** this is so the skidmark isn't spawned above the player. I suggest create a whole layer specifically to store your skidmarks

    ***By default your skidmarks are spawned at 0 degrees. If would be weird to have your car going up and spawn a skidmark going right.

    Hope this helps!

  • Hey there,

    So, I created an "AI" of sorts, specifically, a move-to player action. As you can see below, the monster sets the angle towards the player and then moves toward the player, one pixel per tick. This has been fine for a while, but now I need the Monster to stop changing it's angle.

    I went through all of the actions but I just can't seem to find one that will allow LOS movement towards the Player, without changing the angle of the object being moved. Can anyone help?

    Thank You,

    Stephen

    Hey Tekniko, you can also use the BULLET plugin.

    If overlapping at offest, set bullet speed to [whatever you want]

    If x overlapping at offest, set bullet speed to zero.

    Great thing about the bullet function is you can set the sprite to NON-ROTATING but still move towards player.

  • LaDestitute - Er... whoops. I read the post and responded without checking who the poster was, thinking it was you. Apologies for participating in the derail!

    MPPlantOfficial as LaDestitute said, please create your own thread.

    Alright thanks for the reply, Arima. By the way the way I'm mirin' how the blob bounces on your sig. Great stuff!

  • [Post moved from La Destitute's Zelda-like Thread]

    Hello again guys. This time I'm trying to create enemies like TEKTITES and POL's VOICE.

    Implementing AI to have them move around is easy enough but how are they programmed to JUMP around the place like they do?

    I've been trying to simulate that as you can see in the capx below.

    I used the platform behavior and create a Jump Through Platform beneath them whenever they jump only to have it be destroyed when they land. It works fine even while moving down and side to side but I'm having trouble having it jump while moving up. World gravity and 8-Direction movement are working against each other, preventing the platform and character from colliding.

    http://s000.tinyupload.com/?file_id=476 ... 1698489784

    Now implementing the jump is one thing but how about having multiple Tektites/Pol's Voice on the screen? How do you manage multiple enemies with multiple shadows???

    Replies so far:

    Here's how I do it. The method I use might be more complex than you need, but it's also very flexible:

    All player characters, enemies and such are in a family called units.

    I create an invisible object called base and put it in a family called bases.

    All variables given to those objects are done by giving the families variables instead of directly to the sprites. This makes it easier to compare the values of two of the same object interacting with each other.

    At the start of the layout, I create an invisible base object at each of their locations. I store the UIDs of the units/bases they're paired with as family variables.

    I also create a shadow sprite. It's separate from the base for positioning purposes.

    The base objects are the real controlling objects where most of the code happens. Because all the player characters, enemies and NPCs are controlled by the same type of object, it's easy to control them however I want by just changing their variables, like if variable mode = wandering, etc.

    The part you're probably most interested in --> The base objects have the variables z and zModifier. The zMod variable is the speed of movement on the z axis (jumping in the air, visually it's the same as the y axis, the z variable is really just the distance between the base location on the ground and the unit in the air), and it is added to the z variable. When in the air, the gravity rate is always subtracted from zMod. When z is lower or equal to 0, the object is on the ground, and depending on the velocity in can be set to bounce.

    Every tick, unit locations are set to base.x, base.y-base.z. Because of how construct works, as long as there are the same number of bases and units (destroy any in the layout before creating them for each unit) no for each is needed, and the units are all at the location of the correct base. I place the shadows at unit.BBoxLeft, base.y and set the shadow width to the unit width (the shadow hotspot is on the left).

    Another benefit to this method is collision can be checked in 3D by first checking for collisions or distances between bases, then checking if their units are overlapping.

    The main downside to this method is it requires a lot of for each loops in situations where construct's auto-picking doesn't work, but I consider the ease of use while coding and versatility to be worth it. If only C2 had containers that could be modified at runtime like CC had with the picker plugin... maybe C3 will have that feature.

    I haven't checked your code, so apologies if I just explained most of what you're already doing, I just thought I should make it clear. Even if you don't want to use my method, perhaps the part about the variables will be helpful.

    You can see this method in action in the gif in my sig. There are more including some of a flying enemy in the first post of Loot Pursuit's devlog.

    This is greatly appreciated! If you people know more methods implementing AI in Zelda-likes, please feel free to reply. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • As much as I would want to help you and that your problem is partially on topic, I would appreciate my thread not being hijacked. If you need help, it's best to create a thread in the "How do I..." board.

    Oh alright I'm sorry. I didn't realize I was being insensitive

  • Hello again guys. This time I'm trying to create enemies like TEKTITES and POL's VOICE.

    Implementing AI to have them move around is easy enough but how are they programmed to JUMP around the place like they do?

    I've been trying to simulate that as you can see in the capx below.

    I used the platform behavior and create a Jump Through Platform beneath them whenever they jump only to have it be destroyed when they land. It works fine even while moving down and side to side but I'm having trouble having it jump while moving up. World gravity and 8-Direction movement are working against each other, preventing the platform and character from colliding.

    http://s000.tinyupload.com/?file_id=476 ... 1698489784

    Now implementing the jump is one thing but how about having multiple Tektites/Pol's Voice on the screen? How do you manage multiple enemies with multiple shadows???

  • MPPlantOfficial Another solution is to use an invisible border before the ledge with a solid behavior (initially disabled) and having a 'conditional solid' activated or not depending on what overlaps with the border.

    MPPlantOfficial So I'm making a side scroller game and I've got enemies that don't fall off "ledges" or platforms. I basically attached or pinned a small sprite to enemy sprites front foot ( or whatever) and the events say if the small sprite is not overlapping with the tilemap, turn the enemy around. Hope that helps!

    Both great solutions. Thanks guys!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi LaDestitute, I'm currently building a Zelda-like myself for phones.

    I'm having a little bit of trouble implementing these kinds of creatures: http://zeldawiki.org/Hardhat_Beetle

    How do you make them move towards your character but not fall off a ledge?

    I'm assuming you're using tilemaps for ledges as well??

  • You are checking relative positions, but moving to absolutes. You need to offset the position, to keep it's same relative position.

    http://www.blackhornettechnologies.com/ ... s_BHT.capx

    Alright thanks! I'll be testing this soon as I download c2 latest version.

  • Hey there. I'm making a Zelda-like right now and I managed to create a Knockback by using the BULLET function.

    Unfortunately I cannot upload the CAPX as there are many other things in there I worked on.

    Somthing like:

    Player On collision with [Object of Choice] >>> Set Bullet Speed to 400, Set bullet angle to [-angle of player and object]

    Player Bullet Spd > 0 >>> Set Bullet Speed to [ (player bullet speed) - 1000*dt ]

    You can just modify the dt multiplier and bullet speed to determine how much knockback you want.

  • ...so i'm having problems with variables and global numbers...

    I hear you.

    The WEBSTORAGE function WAS easy to use in earlier versions however the newer CAPX files have this whole "get" bs that makes it so much more complicated. I suggest you look for old CAPXs utilizing the old Webstorage systems and build your games there.

  • Hey guys; this is a problem I've been struggling with for days now. I managed to create a pretty good THREADMILL-LIKE effect with some sheets as you will see in the CAPX below. I made a manual wrap as you will notice to address the non-uniform thicknesses of the sheets so that they SHOULD be in the same relative locations with respect to each other after the player swipes.

    If you try the CAPX however, after several attempts of swiping, you'll notice first, sheets of the same type appear to gather together and later sheets of All types somehow appear to gravitate at a single point in the x-axis. I've tried everything from adding a For loop to attempting to address the positioning of each sprite itself (using the Self.X function) but the end results are the same.

    Now my goal is first to get this threadmill effect working then to procedurally generate random sheets of different thicknesses that are spread 0 pixels apart and not overlapping. As of right now I have no idea how I'm going to implement the latter. Any recommendations ??? <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Link:

    http://s000.tinyupload.com/?file_id=700 ... 8010198810

  • Use the "Trigger Once While True " function. You can find it under the systems plugin.