WIKI: Workshop Syntax & Script Database

Wrote a script to detect whether a player is AI.

// Let ‘Event hero’ mean ‘Hero of(Event player)’
Wait(0.25, Abort when false)
Loop if(0 > Index of array value(All heroes,Event hero))
Set player variable at index(Event player, S, 2, Event hero)
Skip if(Event hero == Ana, 2)
Start forcing player to be hero(Event player, Ana)
Skip(1)
Start forcing player to be hero(Event player, Ashe)
Wait(0.016, Abort when false)
Set player variable at index(Event player, S, 1, Event hero ==Value in array(Player variable(Event player, S), 2))
Start forcing player to be hero(Event player, Value in array(Player variable(Event player, S) , 2))
Stop forcing player to be hero(Event player)

If you run this for each player on has spawn you can use.

Ongoing each player
Condition: Value in array(Player variable(Event player, S), 1) == true
Action: Set damage dealt(Event player, 0.0001)

To ensure your AI players act normal but wont kill you while you debug something.

Can I ask; does a sorted array create an array based on the highest value first, or lowest value first?

e.g. if I sort the array All Players by Score Of, will Index 0 of the resulting Array be the player with the highest or the lowest score?

Hey WyomingMyst,

I recommended your post in my latest video where I talk about the best Workshop Tutorials and other resources to get started.

Thanks for the hard work!

CONDITIONS

Conditions are optional definitions which determine if the event is to trigger the action or not. These are done by comparing one value to another and seeing if the condition is true. You can list multiple conditions in any given event. Multiple conditions act as logical AND operator, meaning that the action will run only if ALL conditions are True. Here are the list of conditions.

Can’t edit the wiki, so just a reply.

github(dot)com/I-Need-Healing/overwatch-workshop-document

Hello everyone, sorry about the slow progress. School has started back up for me so I don’t have as much as I would like to well, school, work, sleep, eat, play Overwatch, and do what I do on the forums (which includes answering tech support inquiries, OWL discussion threads, and more). Hopefully, I can nip this project in the bud soon.

I did get more the list built into the Action Syntax, it is getting very close to being done. I also updated the new Ray Cast values from the latest patch as noted by PumaPants.

Thanks everyone! I am glad this is already proving helpful for most of you out there already!

1 Like

I was worked these things out few days ago ,include all ACTIONS / VALUES / STRINGS and all the parameters describe.hope it can do some help .

Is there a way to modify the heroes shown in the TAB screen? I want it to be a mystery what heroes the enemy team has picked, like it is for the first fifteen seconds of a normal match (portraits show question mark).

Is there a way to reference the amount of damage done by an event? Like if I wanted to set an event so that anytime someone takes damage and is using a certain ability, they heal instead of take damage; I know i could set the amount of HP healed to twice the amount of damage done, but how would I reference the amount of damage done? The closest thing i can find is the most recent DoT variable.

Should I used endless loops with skip if instead of conditions so the condition is checked less often? What are some tips on how to code for optimization/reduce server lag. My game crashed after 45-60 min every game. My players attack button sometimes gets stuck “on” so they just keep firing.

Good news, everyone, I have now completed all syntax entries. The database is complete. My next step of the project (when the workshop goes live) is to create a series of tutorial videos that demonstrates most if not all of the individual value and action syntax as simple demonstrations, which will be loaded into each entry drop down. That being said, if any of you have valuable content to share, be sure to edit it into the Wiki. Thank everyone for your patience as I build the list!

1 Like

Thank you for all your hard work here! :slight_smile:

Player receives damage
If hp<= 25
then
player var B == True

Is there a way to alter the Hero Gauntlet preset so it can be a 1v1 with my friend instead of an 8 person ffa?

There are multiple ways to do this. The simpliest would be to load the Gauntlet rule set and then in the standard custom game settings (not a Workshop rule) to change max players from 8 to 2.

I have a simple question. How would you go about creating a simple Mercy HP Regen?

I would like for a hero to have a HP regen. If they take damage, the HP regen stops for 1 second, then starts up again.

How do I create Mercy’s passive?

You surely pulled a mammoth effort out of your hat this time! Great job!

Now; do you know if there’s a way I can knock scripts out as text and import them, rather than clickety-clicking every expression together?

Not sure if the share code still works, but I created it long ago when I first got started with the workshop.

CODE: VJWTE

Just remove the part where the player need to crouch to start the activation of it.