Guizmus's Forum Posts

  • Hey!

    Next teaching then :)

    • use

      username to push a notification to someone, like the notification you've got from Tarkion

    don't share a .caproj, it won't work on its own. You need to save your project in .capx instead to share it easily.

  • Colludium OrangeFlash81 the reason it doesn't work in the first post is because every item spawned is added to the current object selection. So every "Set bullet angle" is applied to all the bullets in the current selection, and this is why the same angle is on every bullet at the end.

    LittleStain had it right, it should work this way, even if it's not that beautiful. MadFactory solution is nicer and will also work (as the new bullet is created inside the loop, thus not added to the current object selection on next loop index).

  • Hello.

    You should always provide a .capx that shows your problem, because what you are describing should work, so you are doing something wrong somewhere and we can't know what.

    Here is a sample capx to show you how it works. I hope it helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need priorities and control tick.

    First of all, put a timer on your enemy. This will be the control timer. Every time it runs out, the enemy should decide what to do : run from the player or escape corner. Then you call the corresponding function and start a new timer to choose a new action, but not right now.

    What it would do in game :

    T=0s : enemy choose to run from player, start new timer (2 seconds ?)

    T=2s : enemy is not far from the corner, and the player is close too. The enemy chose to run from the corner, and starts a new timer. He will the run from the corner for at least the timer's duration, meaning it won't do back and forth every millisecond.

    When you make AI decisions for anything, having a control timer is usefull to prevent micro-orders. I ran into the same problem with a "pet" simulation, where the pet would eat for less than a second, then start running, then eat again because its priorities were almost the same at that time, and each order changed the current priority in less than a second. If no order can be issued more than once in a while, this problem goes away. It makes the ennemy less reactive to the player's actions though.

    Another solution is to have a control timer quite short (1 second ?) but in your decision function (the function that decides what the enemy should do), take into account what the enemy is currently doing. If he is running from the corner right now, maybe the proximity of the player doesn't have the same weight in the decision... It's all try and balance then.

  • Hey,

    Your problem is quite clear here : the link between an object and its map representation isn't defined. To put it more clearly, how would the map update an enemy position if each enemy_icon isn't "connected" to an enemy ? I don't see, as a computer, how I would do it as your system is right now.

    So the solution now.

    1/ you need a map initialization. In the initialization, you'll spawn an enemy icon for each enemy on the game. Same goes for energy, so I'll just explain for the enemy for now. Every icon needs a variable, "targetUID" for example. This variable is set during the initialization to the enemy.UID. The positioning is then done exactly like you did for the player icon.

    2/ you need a map icon adding system, to spawn a new icon on the map every time a enemy is spawn.

    3/ during the map actualization, position the player icon like you did, then do a forEach on all the enemies, select the corresponding enemy_icon on the map (using the variable we added in 1/), and then position the icon on the map.

    I see you have a licence for C2, so I'd suggest you use families for "mappables" objects (i.e. the objects of the game that have a map icon) and a family of "map_icons", as all those icons have exactly the same way of initializing/updating/destroying.

    I hope this explanation is enough, I'll put some code in if you need though. Don't hesitate to ask if anything isn't clear.

  • Roccinio It wasn't a useful here. It is automatically done on item initialization.

    It is to be used when there are changes in the obstacles present on the map. If you spawn a tree and don't do it afterwards, it will let the path go through the new tree. It won't see that a wall has been destroyed either if you don't force a regeneration of the map obstacles.

  • Hey there !

    1) Steam licences travels with your steam ID. so don't bother, as long as you can log in with steam. Even if you had bought it here, you could have moved it from a computer to another if needed.

    2) Python isn't usable here, and it's javascript not java ^^ But you'll see rapidly, C2's events are lovely to use and play with, giving lots of possibilities and being not that hard to learn in the end.

  • What does the map looks like today ?

  • You can do ifs, elses, ... and whatever you could do in JS in logic. Example with some comments

    If you're having trouble about picking, it's not exactly the same. By default (when no condition is applied), every object in the layout is picked. After each condition, you select a little more elements, removing from the selected list elements that don't meet the conditions. That means that adding a condition "Ennemy.HP > 0" won't pick ennemy with HP>0 but will remove every ennemy with HP <= 0 from the selected list. This is why there are conditions like "pick all", to add items to the selected list.

    Certain conditions, like "compare 2 values" in the System object, are boolean conditions, and won't be considered as affecting an object type. They will just block an event from triggering if they are false.

    The best way to really understand all the possibilities of this system is to create a sample capx, and try with lots of debug, see what triggers in what cases, find out what the "wait" action can do to the function parameters, discover that removing every object from the selected list will prevent the event from triggering, thus will trigger the else event, ...

    Experimentation is a nice friend here, but there are also lots of things in tutorials ;)

  • Hello there, let's do a little necro-topic-phily !

    I just saw this post, doing some research on illuminated.js and its implementations around the web, and after starting to implement some basic functions of it (finding all the lightblocker segments, corners, some low level intersection functions, ...).

    At first, I tried to implement it just by using the lib, but it seemed to block in lots of area, so I started rewriting it a little more.

    I had some questions on how people think it would be best :

    • for choosing the lightblockers, I went with a small behavior, a little like "solid", that you just add on the objects that should block the light. I then tried to reproduce the way that Pathfinder selects its blockers (custom or solids) but it isn't entirely working for custom yet. Do you see any other ways of selecting the good light blockers ? Should there be any other type of light blockers ?
    • for displaying the light effect in the end (I haven't got into this point yet), I thought about asking for a base frame (just like the sprite), and cut it according to how the light polygon will be drawn. The alpha radius will then be prepared directly in the sprite, and a multiply should then be added to the "lightCaster" sprite. I'm still having hard time finding a good way to apply the frame correctly...

    As this library is now up for some times, and surely somebody tried this before me, I would like to know if anybody had any advice or thoughts on how it would be best. Of course, if and when this is good, I'm planning on releasing it on the forums.

  • Well, you can always post a sample capx, duplicate of the original with everything removed but what you need help on.

    If you just add a condition "once while true" on your event 43, your problem will be solved though. The problem right now is that you don't have a trigger for the portal to appear, you just check if the time has passed. But as once the time has pasted, it has passed every tick, your condition is always true, thus the once while true.

  • If you spawn the portal at +1000, the portal then should keep its X, not changing it with the players X.

    It depends on how you did your wrap, but mostly I don't understand why you change the X of the portal to player.X+1000... Spawning it at this X won't "link" it to the player, the player.X variation won't interfere with the portal.X.

    Could you post your capx for better help maybe ?

  • It's normal, your subevent won't ever trigger, as it will check if the spacebar has just been stroke only 1 time, this time being just after (like 0.01 ms after) the ball has been destroyed.

    What you may want is to take your subevent out of its uper-event, so it can trigger on its own. You may also want to add a condition "spr_ball.count = 0" if what you want is to spanw a new ball after the previous one has been destroyed, once the player hits the space bar.

  • The free version is enough for your first month of discovering C2, at least. You won't have that time though if you plan on the steam sales.

    You can do whatever you want on C2, but it's optimized for games, not apps, meaning it will be more intuitive to make a game than a calculator. It's won't be hard or impossible to go for a calculator though, just less intuitive.

    The "limitations" are that C2 is made of javascript, and all exporters will use JS to run your game, making it a little slower than a native app on Android for example (not that much though, but you know how that works). On the other side, what you develop can directly be exported to multiple supports with very little efforts.

    And I'm all with California's first remark : any prototype is about 1 hour work in C2, where it could be 2 to 3 days in jQuery, PHP, ...

  • Love the style of your map :)