My examples

Get help using Construct 2

Post » Fri Jan 20, 2012 9:27 pm

ahhh ok i'll have a look online
B
30
S
13
G
7
Posts: 740
Reputation: 8,044

Post » Tue Jan 24, 2012 5:38 pm

[QUOTE=Yann] 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 :
[code]-> Ajax: Request "http://yourURL/post.php?name="&Textbox.text&"&score="&score (tag "sendScore")[/code][/QUOTE]

@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!
B
47
S
3
G
5
Posts: 56
Reputation: 4,630

Post » Tue Jan 24, 2012 6:16 pm

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.
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Mon Apr 09, 2012 9:44 am

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.
B
8
S
2
G
3
Posts: 5
Reputation: 2,483

Post » Mon Apr 09, 2012 6:54 pm

[QUOTE=mattrouse] 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?[/QUOTE]
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.R0J0hound2012-04-09 18:55:02
B
94
S
33
G
117
Posts: 5,392
Reputation: 75,345

Post » Fri Apr 13, 2012 1:53 pm

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!
B
2
S
1
G
1
Posts: 16
Reputation: 782

Post » Mon Apr 16, 2012 8:59 am

Anyone? plz!
B
2
S
1
G
1
Posts: 16
Reputation: 782

Post » Mon Apr 16, 2012 10:09 am

I'll look into it when im home from work.
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

Post » Wed Apr 18, 2012 9:01 am

Thx a lot Ize :)
B
2
S
1
G
1
Posts: 16
Reputation: 782

Post » Wed Apr 18, 2012 6:24 pm

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.
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 0 guests