Lou Bagel's Recent Forum Activity

  • > You can definitely use php to send an e-mail from a server. You can redirect using the browser events.

    >

    I am not a programmer

    and I don't know such things how to do

    For Browser:

    • Double Click layout screen
    • Add Browser
    • On events page add the action to change/redirect URL

    For PHP:

    • Typically you would have your own server/web hosting but there may be free ways you can use other servers for this. So google a solution for that if you don't have your own hosting
    • Go go layout screen, double click and add AJAX
    • On Event page use AJAX to send POST
    • Google a php template for e-mail or look for a tutorial on here. It may look intimidating if you don't know anything but you usually don't need to change anything at all except the names of the variables (to match what you send in the AJAX post) and maybe deleting some fields/variables you don't need (CC; BCC; Senders name; Subject; etc depending on template you choose)

    Using PHP to send e-mail is very common so many tutorials out there and using AJAX in construct to send data to a PHP script is fairly common and have seen several tutorials and posts.

  • Just had a thought and wondered if anyone else has done it or thought it through:

    For an RPG style game would it make sense to use pathfinding for the NPCs?

    Think like in a town and cut scenes, as in not action. That way when you want to have them move they will move around the player and other NPCs instead of in the classic RPGs where random townspeople would run into you and walls and such.

    This would mean having to give the player and all NPCs the solid behavior, correct? Will that have any unwanted affects?

  • I think that is the easy way but idk i will try it, i will come back!

    I was actually asking a clarifying question. You say you don't want them to collide/overlap, which to me those are two separate things. Collide would be bouncing off each other where overlap does not. So I was asking if you wanted neither to happen and them to avoid each other in pathfinding.

    One simple thought would to be make use of the pathfinding cost. So if after one instance choose a path add cost to that path to encourage others to choose a different path.

    If your layout isn't too maze-like (not too many obstacles) I would think about ditching pathfinding behavior and make some events to avoid obstacles. Something as simple as pick nearest (obstacle) instance, if angle(player.x, player.y, obstacle.x, obstacle.y)-player.movement.angleofmovement is between -15 and 15 then alter the course could work.

    These suggestions won't make the AI look as intelligent as some of the more elaborate suggested solutions. But you may want to take that into consideration, the intelligence of your enemy, when designing the AI for it. If low intelligence or making a goofy game you can have the object change course on collision even. If this is for a zombie wouldn't you rather have it running into stuff instead of flawlessly navigating a maze-like layout?

  • You can definitely use php to send an e-mail from a server. You can redirect using the browser events.

  • Do you mean they don't collide as in they avoid each other? Or take an alternate route if other zombie is already taking a route?

  • Speaking of server, tt seems like the only foolproof way to make a game like that is to store some info on a server.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice going there man!

    Having those default values stored as instance variable of the player sprite would make the most sense, as those values are directly tied to how that particular sprite behaves. However, global variables or a dictionary wouldn't be bad either. So I guess in the end it all boils down to what you prefer.

    Thanks!

    Another option I may just take is make a function for each (setSprintSpeed; setWalkSpeed; etc).

    I have a list of issues I need to work out, especially with the sprint (using x button), but thought I would share a link anyway to what I have right now: (sometimes its fun to see the progress)

    http://loubagel.com/archives/louPlatform/080716/

  • I'm sure every time someone shares their events you will need to customize some for your layout. I hear ya on the tutorials. I found a good one on it but can't find it again—there needs to be upvotes or something on tutorials so the more useful ones are easier to find.

  • I can't find the tutorial I used but here is what I did:

    Global Variable ControlPadTouchID (forgot to capture in the snip)

    I crossed out some unrelated events and highlighted the ones pertaining to ControlPadTouchID

    Basically there are three steps:

    • Anytime a touch starts it checks if it is touching the control pad. If so it changes the variable to the touch's ID
    • If the variable is not -1 then that touch's location will be tracked to determine which direction to move
    • Anytime a touch ends there will be a check to see if it was the touch ID stored in the variable. If it isn't then the control pad movement isn't interrupted. If it is then the variable will be set to -1 which stops step 2

    Should be able to make another global variable for the other controlpad/joystick and duplicate the events. The touches should be tracked separately and not interfere with each other.

  • Haven't looked at your capx yet but what I mean is tracking the touches so they don't affect each other. So you would have on touch ends & Touch ID equals X

    I haven't done two joysticks but I have done control pad and buttons, you can see by clicking the ninja picture in the middle of my signature. It took some testing and debugging but it is definitely possible

  • Have you tried using the debugger to monitor objects? Or creating a text box where you can append text as events fire? That can help you understand what is going on.

    Do you have an event that re-enables the platform behavior? Maybe that is firing and you don't realize it

  • Are you talking about once you reach the edge of one layout it loads the next layout?

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies