Ifhitspace: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
'''ifhitspace''' ''{...}''
Checks to see if the player has pressed the open button (space by default).
Checks to see if the player has pressed the open button (space by default).
Example:
<pre>
// This will cause a sprite to fall when "open" button is pressed.
actor FALLING_APPLE
  ifhitspace
      {
        fall
      }
  enda
</pre>


[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Player manipulation]]
[[Category:Player manipulation]]
[[Category:If conditions]]
[[Category:If conditions]]

Revision as of 22:49, 6 January 2009

ifhitspace {...}

Checks to see if the player has pressed the open button (space by default).

Example:

// This will cause a sprite to fall when "open" button is pressed.

actor FALLING_APPLE
  ifhitspace
      {
        fall
      }
  enda