Dippy19's Recent Forum Activity

  • I'm trying to make a walker game where the game has to count users steps in the background. As far as I can tell, that is not possible with Construct2, but is there some sort of workaround/hack to keep some parts of the game running in the background?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I hope it's OK, if I bump this. Still haven't been able to figure it out

  • Hello This might be a little specific, but I hope I can get some help.

    I'm currently making a website with Laravel to host my game and I would like registered users to have achievements saved on their profile. So I have a users table and an achievement table in my database, and a pivot table that has two columns with user id and achievement id. Now I would like to send information (I presume with AJAX) on a certain event to my controller that creates an entry into the pivot table when a user collects an achievement.

    So in my framework I have a route:

    Route::post('achievements', 'AchievementsController@achievement');

    That points to a controller:

    class AchievementsController extends Controller

    {

    public function achievement()

    {

    $burek = new Achievement_User;

    $burek->achievement_id= ??????;

    $burek->user_id= Auth::user()->id;

    $burek->save();

    }

    }

    And in C2 AJAX I just enter URL "achievements") and it points to the right controller (tested with a GET request and it worked perfectly)

    But I don't know how to send in the part with the question marks? I can't figure out how to send a POST request that would fill in the question marks.

    If anyone can help, it will be much appreciated.

    PS: I'm not a coder/programmer, so please explain everything like you are talking to a 6 yaer-old

Dippy19's avatar

Dippy19

Member since 3 Feb, 2016

Twitter
Dippy19 has 1 followers

Trophy Case

  • 8-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

10/44
How to earn trophies