Editing WeaponCtrJump

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 24: Line 24:
*''psprnum'': what gun sprite type this function affects:
*''psprnum'': what gun sprite type this function affects:
::0 ''weapon'': affect main weapon sprite
::0 ''weapon'': affect main weapon sprite
::1 ''flash'': affect muzzle flash sprite (which appears overlapping the main weapon sprite).|examples=
::1 ''flash'': affect muzzle flash sprite (which appears overlapping the main weapon sprite).|example=
{{example|description=The following example modifies the Doom pistol to go into recharging animation after each ten shots, IF there is ammo left:|code=
{{example|description=The following example modifies the Doom pistol to go into recharging animation after each ten shots, IF there is ammo left:|code=
  '''framedelta'''              <nowiki>{</nowiki> '''name'''=S_PISTOL3; '''action'''=[[WeaponSetCtr]](0,1,add); '''tics'''=0; '''nextframe'''=S_PISTOL3TESTAMMO<nowiki>}</nowiki>
  <nowiki>'''framedelta'''              { '''name'''=S_PISTOL3; '''action'''=[[WeaponSetCtr]](0,1,add); '''tics'''=0; '''nextframe'''=S_PISTOL3TESTAMMO}
   
   
  # CheckReload so it doesn't recharge when no ammo  
  # CheckReload so it doesn't recharge when no ammo  
  '''frame''' S_PISTOL3TESTAMMO <nowiki>{</nowiki> '''cmp'''="PISG<nowiki>|2|*|0|</nowiki>[[CheckReload]]                                      <nowiki>|@next"</nowiki><nowiki>}</nowiki>
  '''frame''' S_PISTOL3TESTAMMO { '''cmp'''="PISG|2|*|0|[[CheckReload]]                                      |@next"}  
   
   
  # use 0 tics so duration is always 0     
  # use 0 tics so duration is always 0     
  '''frame''' S_PISTOL3TESTCTR  <nowiki>{</nowiki> '''cmp'''="PISG<nowiki>|2|*|0|</nowiki>''WeaponCtrJump''(S_PISTOLRECHARGE,equal,10,0,weapon)<nowiki>|@next"</nowiki><nowiki>}</nowiki>
  '''frame''' S_PISTOL3TESTCTR  { '''cmp'''="PISG|2|*|0|''WeaponCtrJump''(S_PISTOLRECHARGE,equal,10,0,weapon)|@next"}
   
   
  # same form as ''original'' S_PISTOL3.  
  # same form as ''original'' S_PISTOL3.  
  '''frame''' S_PISTOL3NORMAL  <nowiki>{</nowiki> '''cmp'''="PISG<nowiki>|2|*|4|</nowiki>*                                                <nowiki>|</nowiki>S_PISTOL4"<nowiki>}</nowiki>
  '''frame''' S_PISTOL3NORMAL  { '''cmp'''="PISG|2|*|4|*                                                |S_PISTOL4"}
   
   
  # reset counter if recharge happens.
  # reset counter if recharge happens.
  '''frame''' S_PISTOLRECHARGE  <nowiki>{</nowiki> '''cmp'''="PISG<nowiki>|2|*|4|</nowiki>WeaponSetCtr(0,0,assign)                        <nowiki>|</nowiki>S_PISTOLREC1"<nowiki>}</nowiki>  
  '''frame''' S_PISTOLRECHARGE  { '''cmp'''="PISG|2|*|4|WeaponSetCtr(0,0,assign)                        |S_PISTOLREC1"}   
   
   
  # Add S_PISTOLREC1 and subsequent frames here.}}|notes=This codepointer is used for frame scripting within a player weapons' frames. It's not designed to affect non-player game world objects or the player avatar. It's used on the frames of guns that typically appear in front of the game screen.
  # Add S_PISTOLREC1 and subsequent frames here.</nowiki>}}|notes=This codepointer is used for frame scripting within a player weapons' frames. It's not designed to affect non-player game world objects or the player avatar. It's used on the frames of guns that typically appear in front of the game screen.


In Eternity each player weapon has three counters that can be edited and conditionally checked by codepointers to achieve scripted effects.
In Eternity each player weapon has three counters that can be edited and conditionally checked by codepointers to achieve scripted effects.
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Templates used on this page: