Sprite Set position through Array (and XML) not working

Bugs will be moved here once resolved.

Post » Sun Mar 09, 2014 8:14 am

Sprite Set position through Array (and XML) not working correctly
There is a XML file to define first position of each Sprite. An array reads the XML.
Array values seems normal if you check at the debug, and if you write the values to a Text object.
But if you want to use this values at Set positon action they don't work as correctly.
To show the problem i used two similar action.

Attach a Capx
____ Upload a Capx to this post ____

Description of Capx
capx reads a XML file and put some sprites to some coordinates through the values inside XML

Steps to Reproduce Bug
  • Just run to see the first version without problem
  • Disable the first Sprite set position action
  • Enable the second Sprite set position action
  • Run again

Observed Result
Sprites are not in correct coordinates

Expected Result
Sprites need to be in correct coordinates

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 8 64 bit

Construct 2 Version ID
Construct 2 Personal edition r 163 (Steam 64 bit)
You do not have the required permissions to view the files attached to this post.
Posts: 177
Reputation: 8,134

Post » Wed Mar 12, 2014 8:19 pm

Closing as not a bug. The positions read from XML are strings, not numbers. Assigning to a local number implicitly converts them to a number, but the disabled action needs to convert explicitly with float().
Scirra Founder
Posts: 24,888
Reputation: 198,582

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests