URL:
  <http://gna.org/bugs/?11654>

                 Summary: Stange situation with teleport feature
                 Project: Battle for Wesnoth
            Submitted by: dret
            Submitted on: Wednesday 05/07/08 at 01:23
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.4.1
        Operating System: win 2000

    _______________________________________________________

Details:

Hi to all...

I want to expose a strange situation that take effect using teleport
feature.

I have a [set_menu_item] with possibility for player's leaders to "teleport"
themself around the map.
Scenario is a 1 vs 1 battle (so we have only 2 players)

I used this code:

At first a MACRO to find the coordinates of side leader:

Code:

#define FIND_COO_LEADERS SIDE VAR1 TO_VAR1 VAR2 TO_VAR2
    [store_unit]
        [filter]
         side={SIDE}
         canrecruit=yes
        [/filter]   
      
        kill=no
        variable=leader_pos
    [/store_unit]

    [set_variable]
        name={TO_VAR1}
        format=$leader_pos.{VAR1}
    [/set_variable]
    
        [set_variable]
        name={TO_VAR2}
        format=$leader_pos.{VAR2}
    [/set_variable]


    [clear_variable]
        name=leader_pos
    [/clear_variable]
#enddef


then the code to teleport unit.... into the new location:

Code:
{FIND_COO_LEADERS $side_number x Lx y Ly}
   
{TELEPORT_UNIT (x,y=$Lx,$Ly side=$side_number canrecruit=yes) $x1 $y1}   
{FLOATING_TEXT x,y=$x1,$y1 0,0,255 "BLINK!"}   


The teleport event works... PERFECTLY... but something strange happens when
the leader unit is teleported over a village:

If Player 1 leader is teleported on an empty village this become... OWNED by
ENEMY (player 2!)   

If Player 2 leader is teleported on an empty village, this last remain the
same... (not owned by any players!!)   

Maybe a Wesnoth Bug...???!!!

Thanks!
Bye




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?11654>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to