My examples

0 favourites
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • you should add a Text box on your layout where the player will enter his name, and on click on the validation button, you will send an Ajax request that will look like :

    -> Ajax: Request "http://yourURL/post.php?name="&Textbox.text&"&score="&score (tag "sendScore")

    Yann

    Reading between the lines I got the idea that Textbox.text here can be anything in practice like an instance variable (Unit.Health) or maybe Sprite.UID

    Am I right here? How should one mention a global variable there? Just using its name? Thanks!

  • Yeah exactly, it's an expression inside c2 all expression follow the same rule/syntax so & is a concatenation operator, and you can concatenate any thing so you can use global &MyVar& or instance &Sprite.myVar& or anything you want.

  • I am curious why you are using the canvas plugin for the Lemmings example and not setting it up like a platformer? Is there any technical reason for this? I am interested in building a Lemmings style game but I am a Construct beginner so I want to make sure I get moving in the right direction as I start on it.

  • I am curious why you are using the canvas plugin for the Lemmings example and not setting it up like a platformer? Is there any technical reason for this?

    It's a technical reason. Sprites use polygon collisions which are not changeable at runtime. Canvas' can set/get individual pixels so it can be used for per pixel collision and tunneling.

  • Hi!

    Im trying to load the online score example of this men

    scirra.com/forum/topic45860_post287339.html

    But i cant get it to work.

    I tried uploading the php files to a server setting permissions to 777 and dont see nothing, all as blank.

    After I tried to change the event url as complete url "http://myurl.com/post.php?name=NEWENTRY&score=1337"

    and

    "http://myurl.com/w/readscores.php?num_scores=10" and nothing.

    Finally i tried to export the game to html5 and upload to my url and it doesnt work.

    Anybody knows a sollution?

    Thx!

  • Anyone? plz!

  • I'll look into it when im home from work.

  • Thx a lot Ize :)

  • Well... i just copied it to my server and... it doesn't work anymore LOL! :D

    Maybe there was a php update or something that broke it, i really have no idea wtf is going on but i'll look into or write a new one once the XML object can write data back.

  • Hahaha, thx for check it Ize.

    I will be waiting your new version of it!

    Thx! :D

  • am I the only one who gets 2-4 fps in lemmings?

  • Well... i just copied it to my server and... it doesn't work anymore LOL! :D

    Maybe there was a php update or something that broke it, i really have no idea wtf is going on but i'll look into or write a new one once the XML object can write data back.

    It didn't work for me too, until I changed "$HTTP_GET_VARS" to "$_GET" based on this link

    Only one issue though:

    I am running WAMP (localhost:90) and C2 preview starts in localhost:50000. The PHP files are on port 90. When I run the capx preview from C2, it sends data to the server & writes it to the file. BUT it doesn't read back! It however works properly, when I export the game as an HTML5 website and place it within WAMP. Any ideas what's happening here? I am on C2-R87 Beta.

    Thanks!

  • abhishan thanks for the fix! :D

    So it really was a php update as i had guessed ;)

    About the localhost issue... maybe Ashley can say something about that :O

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Someone can upload the new online high score archives fixed?

    Thx!

  • It Works with abhishan method!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)