strangeDays's Recent Forum Activity

  • Ok here's a pretty dirty way to do it:

    [attachment=1:2qqnaum2][/attachment:2qqnaum2]

    So basicly it says: when a certain event is triggered (in this case a button is clicked), it sets a group active and in that group it generates a random number between 317 and 700 at every tick. Then it checks in the subevent if that number does NOT lie between oldLocation-100 and oldLocation+100 (meaning: it does NOT lie within range of 200px of the oldLocation). So if that's the case, it sets that good number as newLocation AND oldLocation, generates an object at that location and sets the group inactive. Until you click the button again.

    I'm sure the more experienced guys here can provide you with a better solution because this is probably not that good performance-wise.

  • Maybe I misunderstand, but the minimal distance of the movement already is 317. The method looks like this: random(minimum, maximum).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Edit: capx fixed

    Hey guys,

    since there was some talk about different kinds of enemies, but no actual project with that feature except for the Space Shooter (or I am blind), I went ahead and gave it a shot. I am a beginner, so it really caused some meltdowns in my brain during the last 3 days and there's probably still a lot of room for improvement perfomance-wise.

    As I am working on a tower defense with several levels, I made it so that each level can have its own .JSON-file where the data for the Enemy-Wave-Management can be stored and fed to an array which the events have access to. If you double-click on the JSON-file, you can easily access and change it. (It opens with your standart software. I use JSONedit.):

    [attachment=1:1a443rk2][/attachment:1a443rk2]

    I probably could have saved some events, if one were able to address members of families or instances of an object that have a certain instance variable not only in conditions, but also in actions, somewhat like this:

    [attachment=2:1a443rk2][/attachment:1a443rk2]

    So all in all I think it works but again, since I'm new to this, if someone doesn't find it too complicated to have a look at it, knock yourselves out.

  • Go to the layout view, double click on the screen and create a new Text, call it "Text_Score" for example.

    Then go to the event sheet and do a right click, select add new global variable. Call it "Score" for example, select type Number and initial value is 0.

    Right click again, select add new event. In the appearing popup window, select System -> Every tick. The event appears in the event layout. Next to it, there's add action. Click on it, select Text_Score, then select set Text. In the appearing small popup window enter the following:

    "Your score is: " &Score

  • I thought so too, but it works, yes.

  • Wow, this software is awesome. And so are you. Thanks a lot!

    [attachment=0:3nvpdd7d][/attachment:3nvpdd7d]

  • Hello guys,

    I've set up a little test where sheep collect material and bring it to the headquarters:

    [attachment=2:cofffyss][/attachment:cofffyss]

    The material mountains are all the same object that have different values set for the instance variable material_number. This variable determines which animation is used and it also gives its value to the sheep's instance variable collecting_material_number when the sheep is dropped onto the mountain. When the sheep reaches the HQ, +1 is added to the appropriate material value (which is stored in an array).

    Now the problem is that, when having reached the HQ, the sheep finds its path to the mountain in the middle, but not to the mountain which it first was dropped onto.

    [attachment=1:cofffyss][/attachment:cofffyss]

    I'm looking for an event like

    Find path to a mountain that has a certain value set at its instance variable, e.g. 2

    I would appreciate any kind of help. Thank you.

  • Just dropping by to say thank you, both of your suggestions worked.

  • Hello guys,

    I'm part of a team of students who would like to do a tower defense game as their project and we would really much appreciate any advice regarding our problem.

    Now, I've noticed that in isometric tower defense games, the little soldiers usually have 8 different animations for 8 different directions. So, when the soldier is walking from south to north, there's an walking-animation that shows him from behind; another one that shows him from the front when he's going from north to south and so on.

    In the attached example project I have set up 8 animations:

    [attachment=2:t6tdp5st][/attachment:t6tdp5st]

    Since I can not call every single animation directly with one single event (because the "Set animation to..."-event needs a string as input which I can not directly get from the "Enemy.Pathfinding.MovingAngle"-call (gives only numbers)) I have used an array to assign each animation an int-variable.

    [attachment=1:t6tdp5st][/attachment:t6tdp5st]

    And then there's that crazy mad action (with the red arrow next to it) that sets the correct animation depending on the moving angle. I partly stole that action from another thread and it works now, but our game is already really heavy and with 30 units each calling that action every tick I'm afraid that the game will go into cardiac arrest. So my question is:

    Is there a better way? One that is perhaps less hard on the processing power?

    Thank you very much for any advice. This forum has already helped me a lot.

strangeDays's avatar

strangeDays

Member since 18 Jul, 2014

None one is following strangeDays yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies