Summon Dummybot Reinhardt, holding shield, infront of my position when holding Interact.
When not holding interact, he goes away
Summon Dummybot Reinhardt, holding shield, infront of my position when holding Interact.
When not holding interact, he goes away
variables
{
player:
0: DummyBot
}
rule("Show dummy bot")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Interact) == True;
Entity Exists(Event Player.DummyBot) == False;
}
actions
{
Create Dummy Bot(Hero(Reinhardt), All Teams, -1, Nearest Walkable Position(World Vector Of(Vector(0, 0, 5), Event Player,
Rotation And Translation)), Eye Position(Event Player));
Event Player.DummyBot = First Of(Filtered Array(All Players(All Teams), Is Dummy Bot(Current Array Element) == True));
Start Holding Button(Event Player.DummyBot, Secondary Fire);
}
}
rule("Hide dummy bot")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Button Held(Event Player, Interact) == False;
Entity Exists(Event Player.DummyBot) == True;
}
actions
{
Destroy Dummy Bot(All Teams, Slot Of(Event Player.DummyBot));
}
}
More info about me and my game mods you can find here.
Feel free to comment my ideas.
Holy crap theres a solution for this?
I thought it was impossible
A little bit fixed my codeā¦
But still. Didnt expect such a swift response