| Author | Message |
|---|---|
| battfel |
Post Posted: Fri Oct 22, 2021 5:54 pm Post subject: Process question
|
| My goal here is for damage to come out as 3. Why doesn't something like this work? it comes out as 0. I'm very new to programming and turing
code: var damage : int := 0
var stick : boolean := false process thing if stick = true then damage := damage + 3 end if end thing fork thing stick := true put damage Edit : I realised if I put a delay between stick := true, and put damage, it works. Even just delay(1). This isn't very practical in my bigger project though, why is it that there has to be this delay? |
|