How do I procedural set y position.

Get help using Construct 2

Post » Thu May 21, 2015 11:00 am

Hey guys Im trying to create and position object with xml file by this event.

Image

Im trying to achive this.
Image

But instead I fail and this happen. The object overlaping ontop of each other.
Image


Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Enemy>
   <monster>
   <name>bugaga</name>
   <hp>10</hp>
   <des>A vicious monster</des>
   </monster>

   <monster>
   <name>bugagi</name>
   <hp>25</hp>
   <des>a vicious and stronger monster></des>
   </monster>
</Enemy>



Another problem
Id like to know how to set the instance variable based on the node without repeating the same value as the first node.

I know I can position it manualy but I have different set of monster xml so I need it the y position procedural every time I load different xml file. Thank you.

CAPX file
Code: Select all
http://www.filedropper.com/challanger
B
15
S
3
Posts: 57
Reputation: 909

Post » Thu May 21, 2015 2:14 pm

bump
B
15
S
3
Posts: 57
Reputation: 909

Post » Thu May 21, 2015 3:35 pm

BUMP :D

use "id" for "monster"...

Code: Select all
"<?xml version='1.0' encoding='UTF-8'?>
<Enemy>
       <monster id=""0"">
   <name>bugaga</name>
   <hp>10</hp>
   <des>A vicious monster</des>

       </monster>
   
       <monster id=""1"">
   <name>bugagi</name>
   <hp>25</hp>
   <des>a vicious and stronger monster</des>
     </monster>
</Enemy>"


Image

capx> http://s000.tinyupload.com/index.php?fi ... 1514891622
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Thu May 21, 2015 6:27 pm

OMG thanks man.
B
15
S
3
Posts: 57
Reputation: 909

Post » Thu May 21, 2015 8:02 pm

omg :D

...just pay attention on the "EnemyCharBase" Container..

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Fri May 22, 2015 12:17 am

FYI - *challenge
B
13
S
5
G
4
Posts: 139
Reputation: 2,586


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests