Duke4.net Forums: EDuke32 Scripting - Duke4.net Forums

Jump to content

  • 117 Pages +
  • « First
  • 74
  • 75
  • 76
  • 77
  • 78
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Zaxtor 

#2251

I found a nice md3 mushroom model

but when I put it in the def file.
I get

"Invalid frame name on line"


model "custom/19712_mushroom.md3" {
   scale 1
   skin { pal 0 file "custom/19712_mushroom.png" }
   frame { name "Frame0" tile 19712 }
}


What I am doing wrong?

Error logs

===============================
Mapster32 r6710
Built Feb 26 2018 17:17:23, GCC 7.2.0, 64-bit
Running on Windows 10 (build 10.0.16299)
Initializing SDL 2.0.7
Using C:/$$ EDUKE32 HRP $$/ for game data
Executing "m32_settings.cfg"
Searching for game data...
Found no recognized game data!
Using "DUKE3D.GRP" as main game data file.
Using group file "autoload/duke3d_hrp.zip".
Using group file "autoload/duke3d_music-sc55.zip".
Loading "m32help.hlp"
Error initializing integrated help: file "m32help.hlp" not found.
0 joystick(s) found
Initialized 24.0M cache
Loading "duke3d.def"
Polymer High Resolution Pack (version 5.4.674)
.............................Invalid frame name on line highres/sprites/z_custom.def:8
Removing model 417 due to errors.
...................................................
Definitions file "duke3d.def" loaded.
Setting video mode 800x600 (8-bpp windowed)
Refresh rate: 60Hz
Trying SDL_Renderer "direct3d"
Loading sounds from "GAME.CON"
warning: duplicate sound #261, overwriting
warning: duplicate sound #323, overwriting
Loaded 374 sound definitions.
Wrote m32_settings.cfg
===============================


z_custom.def is the file where I put customized models

Both Duke and Mapster are set to polymer.

This post has been edited by Zaxtor: 01 March 2018 - 11:29 AM

0

User is offline   Mark 

#2252

There is a program called Npherno for viewing models. In there it will tell you the frame name of the model. Or if you post the model here I will find the name for you.
Frame1 is another popular default name. You can try that first if you wish.

This post has been edited by Mark.: 01 March 2018 - 11:39 AM

0

User is offline   Zaxtor 

#2253

I have the software you mentioned, I tried changing frame name, etc etc etc.
and no workin for model in def.

ill attach the file.

I tried Frame1.
Frame0


Imported object, says framecount 1, assuming is Frame1


I attached the thing.
Originally the "image file was tga but changed to png"

Theres 2 md3 files. I use the no1.
Dunno why 2 came, probably cus diff mushroom sizes.
Sprite origin is
https://www.katsbits...ll-mushroom.php

Attached File(s)



This post has been edited by Zaxtor: 01 March 2018 - 12:01 PM

0

User is offline   Mark 

#2254

Unusal frame name. Type it as shown.

MilkShape 3D
1

User is offline   Zaxtor 

#2255

Weird.
Thx

It works.
0

User is offline   Mark 

#2256

Glad to help.
1

User is offline   Danukem 

  • Duke Plus Developer

#2257

Back when I was using models a lot, I would have killed for EDuke32 to have the feature of just telling me what the fucking frame names were, instead of having to load the models up in Npherno to find out.
0

User is offline   Zaxtor 

#2258

How to we make stayput work properly.

if I do
useractor enemystayput SPRITENAMESTAYPUT SPRITENAMESTRENGTH
codes etc etc etc
cactor SPRITENAME
enda

Wont work.

I tried "setactor[THISACTOR].htactorstayput (var)"


they do nothing at all, mob walks out of sector,
Does that to customized mob (sprite from scratch) even if is a copy of an existing mob but with diff name.

What should we put in the code to make it work?
0

User is offline   Danukem 

  • Duke Plus Developer

#2259

View PostZaxtor, on 14 March 2018 - 07:30 PM, said:

useractor enemystayput SPRITENAMESTAYPUT SPRITENAMESTRENGTH
codes etc etc etc
cactor SPRITENAME
enda


That should work. To keep it simple, use

useractor enemystayput SPRITENAMESTAYPUT SPRITENAMESTRENGTH cactor SPRITENAME enda

and put ALL code in the regular actor or states used by regular actor. If you still can't get it to work, post your code for both actors, including which tile numbers you are using, all the move definitions, etc.
0

User is offline   Zaxtor 

#2260

Still wont work.
I made code to the stayput into a single line like u mentioned.

here is code
// Tormented pig

action ATORMENTPWALK     0  4 5 1 20
action ATORMENTPRUN      0  4 5 1 11
action ATORMENTPSHOOT    30 2 5 1 58
action ATORMENTPCOCK     25 1 5 1 16
action ATORMENTPSTAND    30 1 5 1 1
action ATORMENTPDIVE     40 2 5 1 40
action ATORMENTPDIVESHOOT  45 2 5 1 58
action ATORMENTPDYING    55 5 1 1 15
action ATORMENTPHIT      55 1 1 1 10
action ATORMENTPDEAD     60 1 1 1 1


move TORMENTPWALKVELS 64 // standard is 72 pig is 11.1% slower
move TORMENTPRUNVELS 96 // standard is 108 pig is 11.1% slower
move TORMENTPSTOPPED

ai AITORMENTPSEEKENEMY ATORMENTPWALK TORMENTPWALKVELS seekplayer
ai AITORMENTPSHOOTENEMY ATORMENTPSHOOT TORMENTPSTOPPED faceplayer
ai AITORMENTPFLEEENEMY ATORMENTPWALK TORMENTPWALKVELS fleeenemy
ai AITORMENTPSHOOT ATORMENTPSHOOT TORMENTPSTOPPED faceplayer
ai AITORMENTPDODGE ATORMENTPRUN TORMENTPRUNVELS dodgebullet
ai AITORMENTPCHARGE ATORMENTPRUN TORMENTPRUNVELS seekplayer
ai AITORMENTPDIVING ATORMENTPDIVE TORMENTPSTOPPED faceplayer
ai AITORMENTPDYING ATORMENTPDYING TORMENTPSTOPPED faceplayer
ai AITORMENTPHIT ATORMENTPHIT TORMENTPSTOPPED faceplayer

state tormentseekenemystate

  ifai AITORMENTPCHARGE
  {
    ifcansee
      ifpdistl 3084
    {
      ifnotmoving
        ai AITORMENTPSEEKENEMY
      else
        ai AITORMENTPDIVING
    }
    break
  }
  else iffloordistl 32
  {
    ifpdistg 4096
    {
      ifactornotstayput
      ai AITORMENTPCHARGE
    }
    ifrnd 8
    {
      ifbulletnear
        ai AITORMENTPDODGE
    }
  }

  ifrnd 128
    ifcansee
  {
    ifai AITORMENTPDODGE
    {
      ifcount 32
        ai AITORMENTPCHARGE
          break
    }
    iffloordistl 32
    {
      ifpdistl 1024
        ifp palive
          ifcanshoottarget
      {
        ai AITORMENTPSHOOTENEMY
        break
      }
      ifcount 48
      {
        ifrnd 8
          ifp palive
            ifcanshoottarget
        {
          ifrnd 192
            ai AITORMENTPSHOOTENEMY
          else
            ai AITORMENTPDIVING
          break
        }
      }
    }
  }
ends


state tormentshootenemystate

  {
    ifcount 12 nullop
    else
      ifcount 11
    {
      ifcanshoottarget
      {
        sound PIG_ATTACK
        shoot SHOTGUN
        shoot SHOTGUN
        shoot SHOTGUN
        shoot SHOTGUN
      }
      else
        ai AITORMENTPSEEKENEMY
    }
    ifcount 25 nullop
    else
      ifcount 24
      {
        action ATORMENTPCOCK
        sound SHOTGUN_COCK
      }
    ifcount 48 nullop
    else
      ifcount 47
    {
      ifcanshoottarget
      {
        sound PIG_ATTACK
        shoot SHOTGUN
        shoot SHOTGUN
        shoot SHOTGUN
        shoot SHOTGUN
      }
      else
        ai AITORMENTPSEEKENEMY
    }
    ifcount 60 nullop
    else
      ifcount 59
      {
        action ATORMENTPCOCK
        sound SHOTGUN_COCK
      }
    ifcount 72
    {
      ifrnd 64
        resetcount
      else
      {
        ifpdistl 768
          ai AITORMENTPFLEEENEMY
        else
          ai AITORMENTPSEEKENEMY
      }
    }
    ifaction ATORMENTPCOCK
      ifactioncount 2
        action ATORMENTPSHOOT
  }
  else
    ai AITORMENTPSEEKENEMY
ends

state tormentfleeenemystate
  ifactioncount 8
    ai AITORMENTPSEEKENEMY
  else
    ifnotmoving
      ai AITORMENTPSEEKENEMY
ends

state tormentdivestate
  ifaction ATORMENTPDIVESHOOT
  {
    ifcansee
    {
      ifcount 12 nullop
      else
        ifcount 11
      {
        ifcanshoottarget
        {
          sound PIG_ATTACK
          shoot SHOTGUN
          shoot SHOTGUN
          shoot SHOTGUN
        }
        else
          ai AITORMENTPSEEKENEMY
      }
      ifcount 25 nullop
      else
        ifcount 24
          sound SHOTGUN_COCK
      ifcount 48 nullop
      else
        ifcount 47
      {
        ifcanshoottarget
        {
          sound PIG_ATTACK
          shoot SHOTGUN
          shoot SHOTGUN
          shoot SHOTGUN
        }
        else
          ai AITORMENTPSEEKENEMY
      }
      ifcount 60 nullop
      else
        ifcount 59
      {
        sound SHOTGUN_COCK
        ifgapzl 32
          ai AITORMENTPDIVING
        else
        {
          ifpdistl 4096
            ai AITORMENTPFLEEENEMY
          else
            ai AITORMENTPSEEKENEMY
        }
      }
    }
    else
      ifgapzl 32
        ai AITORMENTPDIVING
      else
        ai AITORMENTPSEEKENEMY
  }
  else
    ifactioncount 2
    ifp palive
    {
      resetcount
      action ATORMENTPDIVESHOOT
    }
ends

state checktormenthitstate
  spawn SMALLSMOKE
  ifdead
  {
    state random_wall_jibs
    ifrnd 16
      spawn ATOMICHEALTH
    else
      state drop_shotgun

    ifwasweapon GROWSPARK
    {
      shoot GROWSPARK
    }

    addkills 1

    ifwasweapon RADIUSEXPLOSION
    {
     cactor TORMENTDPIGDSPRITE
    }
    else
      ifwasweapon RPG
    {
     cactor TORMENTDPIGDSPRITE
    }
    else
      ai AITORMENTPDYING
        sound TPIG_DYING
  }
  else
  {
    sound TPIG_PAIN
    state random_wall_jibs

      ifwasweapon GROWSPARK
        sound EXPANDERHIT
    else
      ifrnd 32
        ai AITORMENTPHIT
    else
      ifrnd 64
        ai AITORMENTPSHOOTENEMY
    else
      ifrnd 64
      {
        ai AITORMENTPDIVING
        action ATORMENTPDIVESHOOT
      }
  }
ends

state tormentdyingstate
  ifactioncount 5
  {
    ifrnd 64
      spawn SMALLSMOKE
    state rf
    iffloordistl 8
      sound THUD
    action ATORMENTPDEAD
    move TORMENTPSTOPPED
    cactor TORMENTDPIGDSPRITE
    break
  }
ends

actor TORMENTDPIGSTAYSTILL TORMENTPIGSTRENGTH
ifcanseetarget
 {
  ai AITORMENTPSEEKENEMY
  sound TPIG_RECOG
  cactor TORMENTDPIG
 }
enda
actor TORMENTDPIGDIVE TORMENTPIGSTRENGTH
  ai AITORMENTPDIVING
  action ATORMENTPDIVESHOOT
  cactor TORMENTDPIG
enda

useractor enemystayput TORMENTDPIGSTAYPUT TORMENTPIGSTRENGTH ai AITORMENTPSEEKENEMY cactor TORMENTDPIG enda

actor TORMENTDPIG TORMENTPIGSTRENGTH ATORMENTPSTAND
  fall
  state checksquished
  ifaction ATORMENTPSTAND
    ai AITORMENTPSEEKENEMY
  else
    ifaction ATORMENTPDEAD
  {
    ifrespawn
      ifcount RESPAWNACTORTIME
    {
      spawn TRANSPORTERSTAR
      cstat 257
      strength TORMENTPIGSTRENGTH
      ai AITORMENTPSEEKENEMY
    }
    else
    {
      strength 0
      ifhitweapon
        ifwasweapon RADIUSEXPLOSION
      {
       cactor TORMENTDPIGDSPRITE
      }
      break
    }
  }
  else
    ifai AITORMENTPDYING
      state tormentdyingstate
  else
    ifai AITORMENTPHIT
    {
      ifactioncount 3
      ai AITORMENTPSEEKENEMY
    }
  else
  {
    ifai AITORMENTPSEEKENEMY
      state tormentseekenemystate
    else
      ifai AITORMENTPDODGE
        state tormentseekenemystate
    else
      ifai AITORMENTPSHOOTENEMY
        state tormentshootenemystate
    else
      ifai AITORMENTPFLEEENEMY
        state tormentfleeenemystate
    else
      ifai AITORMENTPDIVING
        state tormentdivestate
    else
      ifai AITORMENTPCHARGE
        state tormentseekenemystate
    ifhitweapon
      state checktormenthitstate
    ifrnd 1
    {
      ifrnd 32
        soundonce TPIG_ROAM
      else
        ifrnd 64
         { soundonce TPIG_ROAM2 }
        ifrnd 72 { ifcansee { spawn FIRESPREADOR spawn FIRESPREADOR } }
      else
        soundonce TPIG_ROAM3
	  ifrnd 94 { ifcansee { spawn FIRESPREADOR spawn FIRESPREADOR spawn FIRESPREADOR } }
    }
  }
enda


This post has been edited by Zaxtor: 14 March 2018 - 08:10 PM

0

User is offline   Zaxtor 

#2261

PS i removed the quote 111,
Was a test to make sure that part of the code works
0

User is offline   Danukem 

  • Duke Plus Developer

#2262

View PostTrooper Dan, on 14 March 2018 - 07:50 PM, said:

If you still can't get it to work, post your code for both actors, including which tile numbers you are using, all the move definitions, etc.


So which tile numbers are you using? If that actor overlaps the PIGCOP tiles, then that could be your problem.
0

User is offline   Zaxtor 

#2263

The tile number is 19839


I would'nt mind if it goes in other sectors with same tile as current tile as long he doesn't fall into the lava lol.

PS
At the moment the pig cop is alone in sector.

All others of his kind are in the same tile number as the one who is with stayput

This post has been edited by Zaxtor: 14 March 2018 - 08:48 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#2264

Maybe it's not enough to have a useractor enemystayput, maybe the tile you switch to also has to be a useractor.
Try this. Instead of

actor TORMENTDPIG TORMENTPIGSTRENGTH ATORMENTPSTAND

useractor enemy TORMENTDPIG TORMENTPIGSTRENGTH ATORMENTPSTAND

_____________________________________________________

If that doesn't work, then just add the stayput code into the actor.

gamevar staysector -1 2
gamevar lastx 0 2
gamevar lasty 0 2

useractor enemystayput TORMENTDPIGSTAYPUT TORMENTPIGSTRENGTH 
     cstat 257
     geta[].sectnum staysector
     cactor TORMENTDPIG 
     ai AITORMENTPSEEKENEMY 
enda

// also edit this part of the main actor:

useractor enemy TORMENTDPIG TORMENTPIGSTRENGTH ATORMENTPSTAND
  fall
  state checksquished
  ifn staysector -1 // stayput enemy
  {
     ife sprite[].sectnum staysector { geta[].x lastx geta[].y lasty }
     else { seta[].x lastx seta[].y lasty }
  }
  // rest of code as normal


1

User is offline   Zaxtor 

#2265

It works.
Pig no longer "commits suicide"

thx

This post has been edited by Zaxtor: 14 March 2018 - 10:43 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#2266

You know how you can blow up corpses with RPG or RADIUSEXPLOSION, even though they are cstat 0? This does not work on actors defined as notenemy -- they will not detect the hit. So here I am trying to figure out why I can't blow up my civilian corpses, and it turns out that is the reason. It's amazing to me that I never noticed that in all of these years. Incidentally it's pretty annoying.
2

User is offline   Danukem 

  • Duke Plus Developer

#2267

Hey I'm hoping that someone more knowledgeable than me can help out with this, or verify that I'm on the right track.

I want to increase Duke's weapon sway speed, to match his very fast running speed. I would still like it to be tied to his velocity, but I would like the weapon sway speed to be about doubled. Unfortunately, manipulating the relevant structs (most notably player.weapon_sway) doesn't seem to do anything. It would seem that the game is hardcoded to update the weapon sway based on the player's velocity values, and while the structs aren't technically read only, writing to them is useless because they just get updated again by the hard coding before they can have any visual effect. In addition to the weapon_sway struct, I also tried manipulating certain constantly updated gamevars such as weaponx_offset in EVENT_DRAWWEAPON. That doesn't seem to do anything either, I presume because those vars aren't actually used in the hardcoded weapon display, they simply point to the underlying structs that do the work.

So, it looks like I have to negate all of the hardcoded weapon drawing and use something like the CON emulation of it that Hendricks266 supplied a while back. Then, with all of the weapon drawing under scripting control, I could replace the hardcoded weapon sway with my own. That's more work than I wanted to do, but I guess I could do it. Am I on the right track, or is there an easier way?
0

User is offline   Zaxtor 

#2268

cstat 0 makes em invinsible.
You must do cstat 256 (to be hittable)

cstat 0 cstator 256 also works

This post has been edited by Zaxtor: 01 April 2018 - 10:56 AM

0

User is offline   Mblackwell 

  • Evil Overlord

#2269

View PostTrooper Dan, on 25 March 2018 - 01:39 PM, said:

Hey I'm hoping that someone more knowledgeable than me can help out with this, or verify that I'm on the right track.

I want to increase Duke's weapon sway speed, to match his very fast running speed. I would still like it to be tied to his velocity, but I would like the weapon sway speed to be about doubled. Unfortunately, manipulating the relevant structs (most notably player.weapon_sway) doesn't seem to do anything. It would seem that the game is hardcoded to update the weapon sway based on the player's velocity values, and while the structs aren't technically read only, writing to them is useless because they just get updated again by the hard coding before they can have any visual effect. In addition to the weapon_sway struct, I also tried manipulating certain constantly updated gamevars such as weaponx_offset in EVENT_DRAWWEAPON. That doesn't seem to do anything either, I presume because those vars aren't actually used in the hardcoded weapon display, they simply point to the underlying structs that do the work.

So, it looks like I have to negate all of the hardcoded weapon drawing and use something like the CON emulation of it that Hendricks266 supplied a while back. Then, with all of the weapon drawing under scripting control, I could replace the hardcoded weapon sway with my own. That's more work than I wanted to do, but I guess I could do it. Am I on the right track, or is there an easier way?



Unfortunately you are correct if you want more nuance. However since it's just contained in a single script it's pretty easy to get set up, You can probably be up and running in 10ish minutes.

I will note though that modifying http://wiki.eduke32....iki/Weapon_sway and http://wiki.eduke32.com/wiki/Gun_pos SHOULD be set-able.

Edit: Sorry for lots of editing, concentrating on too many other things.
0

#2270

I need that some non-hitscan projectiles (like FIRELASER) push switches like hitscan ones, do you have any suggestion for doing that ?

I already tried to shoot hitscan and knee-type on projectile impact, but with no result...

This post has been edited by RichardStorm: 26 May 2018 - 04:30 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#2271

View PostRichardStorm, on 26 May 2018 - 04:29 AM, said:

I already tried to shoot hitscan and knee-type on projectile impact, but with no result...


Strange, because I have made that hack work for me before. Importantly, it should be a player who fires the hitscan, though, since switches do not respond otherwise. One way to do this is to make the projectile cactor APLAYER, fire a short range hitscan at the exact right spot, then cactor back to its correct picnum. If you take a look at Duke Forces, search for "switchbulletcode" and you will see.
1

#2272

Well i knew nothing about APLAYER thing; also, i cannot get why you shoot two bullets, but it seems to work very well ( and it never double press a button).

I tried some variations on your code, but your version is the only that works fine. Thanks :(
1

User is offline   Salvation 

#2273

I'm currently a little bit of stuck with my CON code. About 2,5 years ago i copy/pasted a ironsight code from AMC TC and made it work. However, the ironsight works only if im holding TURNAROUND key down. I want it to be like one click will activate the iron sight and second will de-activate it, so i wont have to hold that button down all the time.

Here is the code:

onevent EVENT_DRAWWEAPON

ifvarand TEMP4 268435456  // Is the player holding the Alternate Fire key down?
ifvare player[THISACTOR].curr_weapon 3 // M4A1 Carbine Iron Sight
	{
	  setplayer[THISACTOR].runspeed 42100
	  setvar RETURN -1
	  setvar x 160
	  setvarvar WEAP_DISPLAY_TEMP2 WEAPSWAYX
	  divvar WEAP_DISPLAY_TEMP2 2
	  subvarvar x WEAP_DISPLAY_TEMP2
	  setvar y 140
	  setvarvar WEAP_DISPLAY_TEMP3 WEAPSWAYY
	  divvar WEAP_DISPLAY_TEMP3 2
	  subvarvar y WEAP_DISPLAY_TEMP3
	  setvarvar WEAP_DISPLAY_TEMP4 weapon_xoffset // setvar the weapon x sway to displaytemp4
	  divvar WEAP_DISPLAY_TEMP4 2 // divide it by 2 
	  addvarvar x WEAP_DISPLAY_TEMP4 // add it to x
	  subvar x 5 // offset it by 5
	  subvar y 40
	  setvar x 160
	  subvarvar x WEAPSWAYX
	  subvar x 10
	  addvarvar x weapon_xoffset
	  setvar y 142
	  subvarvar y WEAPSWAYY
	  rotatesprite x y 52500  0 3825 shade pal 0 0 0 xdim ydim // iron sight
		break
	}
  getplayer[THISACTOR].weapon_pos WEAP_DISPLAY_TEMP2
  mulvar WEAP_DISPLAY_TEMP2 -20
  setvar tilenum 2536
  rotatesprite x y 2536 WEAP_DISPLAY_TEMP2 tilenum shade pal 0 0 0 xdim ydim
  
  setplayer[THISACTOR].runspeed RUNNINGSPEED

endevent


TURNAROUND key has been disabled:

onevent EVENT_TURNAROUND 
setvar RETURN -1 
endevent


This one will disable the crosshair once iron sight has been activated:

onevent EVENT_DISPLAYCROSSHAIR

 ifvare player[THISACTOR].curr_weapon 3
 ifvarand TEMP4 268435456
	{
	  setvar RETURN -1
	}
endevent




0

#2274

I use time variables which keep for how much time a key is pressed, and the desired function is triggered or toggled when the timer is equal to 1:


gamevar  turnaround_keytime 0 1
gamevar  sight_on 0 1
...

ifvarand TEMP4  268435456
   { addvar turnaround_keytime 1 }
  else
   { setvar  turnaround_keytime 0 }

ifvare turnaround_keytime 1
   { xorvar sight_on 1 }

ifvare sight_on 1
  { /* your code here */ }
....


This post has been edited by RichardStorm: 28 May 2018 - 11:21 AM

0

User is offline   Kyanos 

#2275

Where is TEMP4 being set, I don't see how this code does anything with event turnaround returning -1.

I would simplify this, make a variable ALT_FIRE = 1, set it to ALT_FIRE = ALT_FIRE * -1; if turnaround key is pressed, ezpz toggle switch, check to see if it's positive or negative then draw the proper weapon, do the proper things...

This post has been edited by Drek: 28 May 2018 - 11:26 AM

0

#2276

I think TEMP4 stores input.bits ...
1

User is offline   Kyanos 

#2277

I'm just catching that this is based on AMC TC code which I know nothing about, cue up that simpsons gif, I'm turning around and walking away from this conversation. Good luck.
0

#2278

Is there a way to get the current hp of the last actor you've dealt damage to?

This post has been edited by thisbecasper: 28 May 2018 - 03:29 PM

0

#2279

View Postthisbecasper, on 28 May 2018 - 02:41 PM, said:

Is there a way to get the current hp of the last actor you've dealt damage to?

Or when I look at them? I really have a hard time of figuring out how to get the sprite ID or whatever of what I'm interacting with...

This post has been edited by thisbecasper: 28 May 2018 - 04:51 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#2280

View PostRichardStorm, on 28 May 2018 - 06:11 AM, said:

Well i knew nothing about APLAYER thing; also, i cannot get why you shoot two bullets, but it seems to work very well ( and it never double press a button).

I tried some variations on your code, but your version is the only that works fine. Thanks :(


The code fires 2 bullets at slightly different heights. One fires from the base of the sprite and one fires a little above. The code was made for laser blasters, which are considerably larger than bullets. What would happen sometimes without the second bullet is the top half of the laser would hit the switch but it would not register as a hit. The reason it does not count as a double press is hard coding in Duke 3D. Without that hard coding, the shotgun would double press buttons whenever an even number of pellets hit.
0

Share this topic:


  • 117 Pages +
  • « First
  • 74
  • 75
  • 76
  • 77
  • 78
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options