jimutt's Forum Posts

  • You can do this by editing the .htaccess file, if your hosting your game on a web server where you are able to use this. If you're hosting the game on dropbox for example I can't help you.

    This article covers a couple of way of limiting the access to your file: k-state.edu/tools/restrict-access

  • Thanks!

    is it displaying as a blank page for everyone? Just though that it would be nice to get to know the changes. :)

  • Thanks for the tips guys! :) I could probably make use of it.

  • Hi there,

    I some advice for how I best accomplish the following task:

    I need to check for collisions between instances of the same object. This is so that autonomous AI will be able to exchange information when they get "in touch" with each other.

    So what I need to do is when instance A collides with instance B one of instance B instance variables should be set to the same value as the instance Variable instance has.

    What is the most simple way to do this?

    Thank you in advance,

    Jimmy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just want to bumb this thread and ask about the Node-Webkit at any time will support this? Because as I'm working on a simulation game it would be very useful to let it continue to run when I've minimized it on my desktop.

  • Thank you Nimtrix!

    As usual you delivered a perfect solution! :)

    That was exactly what I was looking for!

  • But I'll have like 100 instances of the Bot class. And then there will be a quite big change to add 100 sprites more as I'm sure you understand.

    That will effect the performance more than a couple of events.

    Though I'm not sure if it's possible to do this with just events. So I might have to go with the collision sprite solution anyway.

  • The problem is that you can't do this only inside Construct 2. You need to do a lot of scripting in Javascript and you also need to set up your own web server which will then communicate with the game itself. If you really have no basic knowledge of web programming I'm afraid you'll have to start with learning some basic HTML5 and Javascript.

    Though I have not read all topics about this so there might be someone who has made a plugin which makes the progress easier. But this is a very very big task to do.

  • Of course it is possible to go with an invisible "collision sprite" which is attached to the Bot object. But in my final application I will have a lot of objects on the scene at the same time and then it will be crucial for the performance to not having to use 2 sprites for each Bot object. As that will slow down performance.

  • I just noticed that if I set the Bot to face the left obstacle it only retrieves the distance for that object. So basically it only "sees" the object which it first looks at.

    I hope someone will be able to help me with that.

  • Construct 2 doesn't have built in solution for multiplayer games. Though it is possible to make them. But you need your own server for running the game and a lot of work is required.

    So if you have no previous knowledge of programming and working in server environments I would not suggest you to do it.

  • I guess you didn't really understand what I was asking for. All the angles are set up correctly. That is not the problem.

    The problem is that if you run the program you will see that we only get a distance reading from the right obstacle. And when the Bot object is facing the left obstacle we get no distance.

    So the problem is that it only gets the distance from one of the object instances.

  • Hmm..

    I'm having some issues with this. I've set up a simple example to show it:

    https://dl.dropbox.com/u/82642456/obstacle.capx

    The idea is to get the distance to the Obstacle object in the set angle. Though this only applies for one of the object instances. What have I done wrong?

  • Thank you! :)

    Though it isn't really the most logical thing to get the word "tower" in my head when I'm looking for this ;)

    Though your example is not doing what I'm looking for. This is just auto-rotating a turrent towards the player and then fireing of a bullet. What I'm creating is something of a "vision" system. And I need to detect whether the object is in a given "angle range".

    Here is an example of what I mean: dl.dropbox.com/u/82642456/vision.jpg

    EDIT: But actually I think I just came up with an idea that might work. I'll try that first. I think I just was a bit too tired when trying to do this last time.

  • EDIT: The problem has changed a bit. Please read the last posts.

    Okay, a quick question:

    How do I get the object which is inside a set angle of an other object AND within a specific distance in the set angle?

    I have no problem getting an object that's within the angle but I don't know how to get the distance part.