How do I load image from URL in Pong example?

Get help using Construct 2

Post » Mon Feb 08, 2016 10:11 am

Hello!

So I am playing around with the multiplayer Pong example.

Out of the box, the capx allows players to have a nickname associated with them.

I am trying to also associate an avatar with them; specifically, I want to change their paddle sprite with the image that they have selected.

I've had some trouble with this so far; first, I wasn't aware that only certain images would work with the "load image from URL" function due to cross-domain issues, but now I have resolved that.

The problem is that wherever and however I try and invoke this code, both paddles are being given the same image URL.

At the moment I have 2 textboxes on my login screen, one for nickname and one for avatar/image URL. The nickname is sent as the multiplayer alias, and the avatar is being sent as a multiplayer message once the game has started.

What I am really wondering if it is possible to do "load image from URL" and make it target just one specific paddle at a time. Thanks for any help!
We make Facebook games!

Please contact us if you want to work with us to release your game on Facebook - our team have generated millions of installs for our own C2 and Flash games, and we can do revenue-share deals with YOU, too!

https://u1stgames.com
B
12
S
2
Posts: 79
Reputation: 819

Post » Mon Feb 08, 2016 11:16 am

As an update: I've been unable to resolve this as such, but have a workaround by creating new sprites representing the avatars and overlaying them onto the paddles.
We make Facebook games!

Please contact us if you want to work with us to release your game on Facebook - our team have generated millions of installs for our own C2 and Flash games, and we can do revenue-share deals with YOU, too!

https://u1stgames.com
B
12
S
2
Posts: 79
Reputation: 819


Return to How do I....?

Who is online

Users browsing this forum: fearfulelephants, Laurent and 20 guests