ID:1583357
 
(See the best response by Ter13.)
Problem description:

I have second map and I tried animate() and flick() proc but non of them works. Any help would be appriciated


mob/proc
AttackPhase(/**/)
var/obj/Pokemons/m = src.target
var/obj/Pokemons/p = src.pokemonslist[1]

var/obj/Pokemons/first
var/obj/Pokemons/second

if(m.Speed > p.Speed || (m.Speed == p.Speed) && prob(50))
first = m
second = p
else
first = p
second = m
winset(src,"BattleWindow.battleinfo","text=\" It`s [first]`s turn!\"")
sleep(10)
first.attack(/**/)
if(m.HP<1)
animate(m, transform = matrix()*2, alpha = 0, time = 5)
sleep(3)
winset(usr,"BattleWindow.battleinfo","text=\" [p] have defeated [m]\"")
return
else if(p.HP<1)
winset(usr,"BattleWindow.battleinfo","text=\" [m] have defeated [p]\"")
return
m.choise = pick("Attack")
sleep(10)
if(m.HP<1)
animate(m, transform = matrix()*2, alpha = 0, time = 5)
sleep(3)
winset(usr,"BattleWindow.battleinfo","text=\" [p] have defeated [m]\"")
return
else if(p.HP<1)
winset(usr,"BattleWindow.battleinfo","text=\" [m] have defeated [p]\"")
return
winset(src,"BattleWindow.battleinfo","text=\" It`s [second]`s turn!\"")
sleep(10)
second.attack(/**/)
src.AfterAttacks(/**/)
I assume you've set the screen_locs properly; animate/flick simply does nothing on secondary maps? Have you tried putting these two objects on your default map and seeing if flick/animate works on there first? Just to eliminate that possibility.
I tried on the first map and the resaults are the same :/
What are you setting for screen_loc? Are the objects actually appearing?
Yes they do. I do use for example
screen_loc="Map2:9:-5,4:8"
to locate them. The only problem is animate() and flick().
Now that I think about it I don't think transform and stuff like that applies to screen objects.
that explanes all
Transform does and should apply to screen objects.
Best response
Just finished testing this with Phat T, I found that both flick and animate() work perfectly fine in the screen, even on secondary maps. It appears that Phat T was not grabbing the correct handle to the object in the client's screen.