My examples

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply Page  <1 2345>
Author
2,884 Rep
Post Options Post Options   Quote Wronghands Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jan 2012 at 5:38pm
Originally posted by Yann Yann wrote:

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!
Back to Top
11,785 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jan 2012 at 6:16pm
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.
Back to Top
808 Rep
Post Options Post Options   Quote mattrouse Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 2012 at 9:44am
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.
Back to Top
7,061 Rep
Post Options Post Options   Quote R0J0hound Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 2012 at 6:54pm
Originally posted by mattrouse mattrouse wrote:

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.

Edited by R0J0hound - 09 Apr 2012 at 6:55pm
Back to Top
607 Rep
Post Options Post Options   Quote Bicss Quote  Post ReplyReply Direct Link To This Post Posted: 13 Apr 2012 at 1:53pm
Hi!
Im trying to load the online score example of this men
http://www.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!
Back to Top
607 Rep
Post Options Post Options   Quote Bicss Quote  Post ReplyReply Direct Link To This Post Posted: 16 Apr 2012 at 8:59am
Anyone? plz!
Back to Top
4,219 Rep
Post Options Post Options   Quote Ize Quote  Post ReplyReply Direct Link To This Post Posted: 16 Apr 2012 at 10:09am
I'll look into it when im home from work.
Back to Top
607 Rep
Post Options Post Options   Quote Bicss Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2012 at 9:01am
Thx a lot Ize :)
Back to Top
4,219 Rep
Post Options Post Options   Quote Ize Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2012 at 6:24pm
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.
Back to Top
607 Rep
Post Options Post Options   Quote Bicss Quote  Post ReplyReply Direct Link To This Post Posted: 19 Apr 2012 at 8:33am
Hahaha, thx for check it Ize.
I will be waiting your new version of it!
Thx! :D

Edited by Bicss - 20 Apr 2012 at 9:05am
Back to Top
 Post Reply Post Reply Page  <1 2345>

Forum Jump Forum Permissions View Drop Down