dop2000's Recent Forum Activity

  • You will probably need to use an array as permutation table. (permutation table is essentially an array anyway)

    You can initially fill the array using AdvancedRandom. Then use Array.at(index) when you need a random value from the table. And you can save Array.AsJSON in Local storage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No worries, I've made this same mistake countless times! :)

  • Because you can build an efficient and scalable system.

    Imagine you create a JSON file with records like this:

    {
     "bar_dialogue": {
     "text": "What you want? says one of the bad guys",
     "answers": {
     "answer1": {"text": "I want milk", "xp": 5, "next": "bar_fight"},
     "answer2": {"text": "I want wiskey", "xp": 7, "next": "morning_hangover"},
     "answer3": {"text": "I want to speak to your boss", "xp": 10, "next": "boss_dialogue", "itemRequired": "boss_invitation"}
     }
     }
    }
    

    It contains all information about each screen - the question, answers, the amount of XP players gain when give each answer, where to go next after each answer etc.

    Once you program the events that can parse and process this JSON, you can create practically infinite games without having to modify or add more code.

  • You have a mistake in "Cast ray" action.

    In "to Y" field you have Player.X+2048*sin(angle(Player.X,Player.Y,mouse.X,mouse.Y))

    It needs to be Player.Y

  • That's the most ineffective way to make such games. You have to create separate events for every screen, every choice option. If you continue developing the game like this you will soon realize that it becomes unmanageable.

    In C3 there is a new feature called Flowcharts. I didn't have time to play with it, but I imagine it can be a huge help in creating text based adventure games.

    I C2 I would suggest using some data object - JSON, XML or an array to organize all texts and choices, and create connections between them.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • I wanna use the UID from the array to grab the object to move it and such

    You really should avoid storing UIDs in the array. UIDs are assigned dynamically and can change if you destroy/create objects in runtime or even in the editor.

    .

    I assume you want to spawn different bullets for different weapons, with different properties. Is this right?

    There are many ways to do this. The easiest would be to use templates: create a template for each bullet type, configure all properties directly on the bullet sprite (speed, animation, damage value etc.) Then spawn the bullet sprite by template name. You won't need any arrays or scripts.

    Here is a demo

  • You do not have permission to view this post

  • lepr like that is supposed to be run continuously, on every tick.

    "On key pressed" is a triggered event, it happens once, that's why your object only moves a tiny bit. Besides, you must use dt in lerp expression if you want it to work correctly at different framerates.

    You can change your code like this:

    On Q pressed: Set Action to true
    
    System is Action: dot set position to (lerp.....
    

    But you also need the way to stop the lerp when the dot reaches the player, otherwise it will be chasing it forever.

    I suggest using MoveTo or Tween behavior instead, it will be much easier.

  • A) Input lag is 2 frames at 60hz. I conclude this by storing the previous mouse coordinates one frame back and extrapolating forward 2x that distance.

    Can you share this test project?

  • Hitdistance would return 0 when the ray doesn't hit anything. Check that there are in fact obstacles and that you've configured them correctly in LOS behavior.

    Or maybe the ray hits the player object itself, or some other object attached to the player.

    It's difficult to speculate without the project file.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 250 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x4
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies