Say that a graph edit reaches a running behavior at once (#216)
Colliders no longer says a setting waits for a restart. Concepts gains the paragraph on editing the graph while it runs: the behavior carries on, On start does not fire again. Behaviors names the two new nodes Key was pressed and Key was released.
1 parent
b89e6ecf6a
commit
022df8b21e
3 files changed
+9
-3
No files matched your search
+1
@@ -228,6 +228,7 @@ playing use the same two words.
|
||||
normalized direction, so diagonals are not faster), `Compare` (two numbers count as equal up to
|
||||
float noise, a relative 1e-9, so `time - late == 6` holds without a `Round`; `Equals` does the
|
||||
same for two numbers, and for a number against a typed text that is a number, like `130`), `And/Or/Not`, `Key is down`,
|
||||
`Key was pressed` and `Key was released` (true for the one frame in which the key went down or came up, the frame `On key down` and `On key up` fire in; a key that stays held is not pressed again),
|
||||
`Mouse position`, `Mouse button`, `Is hovered`, `Is touching`, `Layer of` (the collision layer of an object by name and number, see [Colliders](Colliders)), `Animation playing` (whether an animation runs on an object, its progress and time left) and `Animation length` (see [Animations](Animations)), `Get velocity`, `Current state` (name and id), `Is in state` (one boolean per state) ·
|
||||
actions `Move` (dx, dy, scale, dt — connect an event's dt for per-second movement; in the object's own axes, which a turned parent turns too; with *Collide with solids* it slides along what it hits, less friction, and outputs `blocked x/y`, `hit` and the contact `normal x/y`, see [Colliders](Colliders)), `Set position`, `Spawn`
|
||||
(asset input + x/y/z, optional parent → outputs the new object; the asset is picked on the node or arrives over an edge, from an `Asset` node, a variable or a list item. A pick saved while it was still a setting reads as that input's value, so older projects spawn as before; the same holds for the asset of `Is asset`), `Destroy` (removes the object with everything below it; with **keep children** on, only the object goes: its children move up to its parent (top level when it had none) and keep their place, rotation and size in the world, and the output `children` is the list of them, nearest level only. Its behaviors and its rigidbody go with it either way. In the editor run, children that are content of a placed container move up for the run only: their place belongs to the template, so the scene does not learn it), `Emit` (starts a particle source over, see *Particles*),
|
||||
|
||||
+2
-3
@@ -214,9 +214,8 @@ check, a laser, a hitscan shot.
|
||||
- In the editor run every ray cast shows in the scene view for a quarter of a second: green to
|
||||
where it met something, grey to its end when it met nothing.
|
||||
- **Raycast** says what it meets *first*; **Raycast all** (below) says everything on the line.
|
||||
- A setting reaches a *running* instance only when that instance starts afresh: the interpreter
|
||||
holds the graph it began with, so a behavior that already runs in the editor keeps casting with
|
||||
the layers it started on until it is switched off and on (or Play is pressed).
|
||||
- A setting changed while the behavior runs in the editor is what the next cast uses (see
|
||||
*Editing the graph while it runs* in [Concepts](Concepts)).
|
||||
|
||||
## Raycast all
|
||||
|
||||
|
||||
+6
@@ -336,6 +336,12 @@ Play: a position or variable it changes is a real edit — it is autosaved, the
|
||||
**undo does not take it back**. Which is why the switch is off by default and why it belongs on
|
||||
behaviors that arrange or build content rather than on ones that simulate.
|
||||
|
||||
**Editing the graph while it runs.** A change to the graph of a running behavior — a node setting,
|
||||
a link, a node added or removed, an undo — is what the behavior runs from the next frame on (#216).
|
||||
The behavior **carries on**, it does not start over: its variables and timers stand where they
|
||||
stood, and `On start` does not fire a second time, so what it wrote or spawned is not written again
|
||||
into the saved scene. To start it over, switch *Run in editor* off and on (or press Play).
|
||||
|
||||
**Input goes to the tab you are looking at.** While the **Scene** tab is on screen the keyboard and
|
||||
the mouse are the editor's — typing a name or walking the hierarchy with the arrow keys must not
|
||||
steer a game at the same time. In the **Game** tab, where no key means anything to the editor, they
|
||||
|
||||
Reference in new issue
Block a user