How do I procedural set y position.

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

    Im trying to achive this.

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

    <?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>
    [/code:341njzyz]
    
    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:341njzyz]http://www.filedropper.com/challanger[/code:341njzyz]
  • bump

  • BUMP <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    use "id" for "monster"...

    "<?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>"[/code:1fzuddi5]
    
    [img="http://i58.tinypic.com/6i8ho3.png"]
    
    capx>  [url=http://s000.tinyupload.com/index.php?file_id=50546932131514891622]http://s000.tinyupload.com/index.php?fi ... 1514891622[/url]
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • OMG thanks man.

  • omg

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

  • FYI - *challenge

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)