Duke4.net Forums: CON coding problems. - Duke4.net Forums

Jump to content

  • 17 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

CON coding problems.  "Improvements and progress."

User is online   Danukem 

  • Duke Plus Developer

#241

state lotag_code_items 
  espawnvar L_RESPAWN
ends

0

User is offline   F!re-Fly 

#242

Whore ! I still have a shit! The hitag of the items no longer works now. Since I added the code lotags, it wants to operate more.
0

User is offline   F!re-Fly 

#243

Hitag codes fixed !
Lotag cdes fixed !
Operate doors codes fixed !

I'm HAPPY !!!
0

User is offline   F!re-Fly 

#244

View PostMark, on 17 June 2019 - 02:47 PM, said:

Time to celebrate. You have been going after that problem for a long time.


You're right, I had a crazy time on it.
0

User is offline   F!re-Fly 

#245

View PostTrooper Dan, on 17 June 2019 - 03:19 PM, said:

state lotag_code_items 
  espawnvar L_RESPAWN
ends



Thank Dan !
0

User is offline   F!re-Fly 

#246

New idea for the gameplay. Make an invisible Duke code, with a specific item.
0

User is offline   F!re-Fly 

#247

The proto switch door for the BETA version 0.99 is fixed !

All news switch is fixed !

Various elements of destructible decoration (BDP the Gate) is fixed !

Minor changes to DEF, CON files and some textures.

This post has been edited by Firefly_Trooper: 20 June 2019 - 04:43 AM

0

User is offline   F!re-Fly 

#248

Here are two other problems still not fixed.

1. How to make a gradual fall of an item? When it appears, it goes directly to the ground. Which is incorrect.

2. How to have several clipdist for BOSS? I would like a higher "clipdist" so that they can not go past in some places and a lower "clipdist" to shrink them to the shrinker.
0

User is online   Mark 

#249

I didn't think this thru so it might not be the right way.
Create a new invisible actor called bossblocker and place it in the map where you do not want the boss to pass thru. In the boss code use findnearactor so when the boss is near the bossblocker actor it increases the clipdist of the boss.

This post has been edited by Mark: 20 June 2019 - 08:01 AM

0

User is offline   F!re-Fly 

#250

It's still strange to use another actor to block another. It should be just one actor. I will nevertheless try this method.

Do you also know how to have objects with a progressive fall?
0

User is online   Mark 

#251

The new actor is not blocking. Its only purpose is to provide the boss code with something to trigger a clipdist change when the boss is near it. Making it a new actor makes it easy to place all around the map where it is needed. Just like placing an SE wherever its needed.

I coded something in my Suburbs remake for a guy falling off a ladder. I don't remember what I did. I'll look at it again and see if its anything useful for you.

This post has been edited by Mark: 20 June 2019 - 10:09 AM

0

User is offline   F!re-Fly 

#252

Thank Mark!

Could this method also correct some projectiles launched by enemies, to prevent them from exploding on them?
0

User is online   Mark 

#253

I checked my project with the falling actor. Its just a simple use of move command for up and down with a different speed for each one.
Its not progressive. But I think if you use the move command along with monitoring iffloordistl you can start the fall speed slow and when it reaches the height above the floor you choose, it will speed up. Someone else should be able to help better than I can.

I have no idea about the projectile use.

This post has been edited by Mark: 20 June 2019 - 11:50 AM

0

User is offline   F!re-Fly 

#254

Ok. I'll take the coding for the "clipdist"

Thank you, I will see this value too.
0

User is offline   F!re-Fly 

#255

Another old problem for the script.

I wanted to make a second "atomic health" much rarer and gives a value of "100" for the health point. Only, it refuses to increase health when Duke picks up the item.

useractor notenemy PEARLHEALTH
  fall
    ifp pshrunk nullop
    else
      ifp palive
        ifpdistl RETRIEVEDISTANCE
          ifcount 6
            ifphealthl MAXPLAYERATOMICHEALTH
              ifcanseetarget
      {
        addphealth 100
        quote 129
        sound GETPEARLHEALTH
        palfrom 16 64 64 64
        killit
      }
enda

0

User is offline   F!re-Fly 

#256

Are there any "var" commands to increase the player's health and armor? I wish I could integrate the super "Atomic Health" and "super armor"
0

User is online   Danukem 

  • Duke Plus Developer

#257

The easiest solution in this particular case is to add "cactor ATOMICHEALTH" right before the "addphealth 100" line. ATOMICHEALTH is hardcoded to be able to increase the player's health up to MAXPLAYERATOMICHEALTH.
0

User is offline   F!re-Fly 

#258

I understand better. Can "Cactor" also prevent an actor from turning off a sound? Like the famous code of "enemystayput" recognition sounds

This post has been edited by Firefly_Trooper: 24 June 2019 - 09:53 PM

0

User is online   Danukem 

  • Duke Plus Developer

#259

View PostFirefly_Trooper, on 24 June 2019 - 09:52 PM, said:

I understand better. Can "Cactor" also prevent an actor from turning off a sound? Like the famous code of "enemystayput" recognition sounds


cactor = change actor = change picnum

It simply changes the picnum of the actor to a different picnum. https://wiki.eduke32.com/wiki/Cactor

Nothing more, nothing less. That is all I am going to say about it.

Except I will say one more thing: the change goes into effect immediately, but the current code execution that started before the cactor command was used will complete. On the next tic, though, if the actor still exists and still has the new picnum, it will execute code (if there is any) associated with that new picnum.

This post has been edited by Trooper Dan: 24 June 2019 - 10:02 PM

0

User is offline   F!re-Fly 

#260

I see ! It's an interesting track to do what I wanted to do for a long time. I will use a gamevar to test.
0

User is online   Danukem 

  • Duke Plus Developer

#261

Just to be clear, all you have to do is add "cactor ATOMICHEALTH" as I suggested, like this:

useractor notenemy PEARLHEALTH
  fall
    ifp pshrunk nullop
    else
      ifp palive
        ifpdistl RETRIEVEDISTANCE
          ifcount 6
            ifphealthl MAXPLAYERATOMICHEALTH
              ifcanseetarget
      {
        cactor ATOMICHEALTH
        addphealth 100
        quote 129
        sound GETPEARLHEALTH
        palfrom 16 64 64 64
        killit
      }
enda



No gamevars are required.
0

User is offline   F!re-Fly 

#262

Yes thanks Dan, but I was thinking of another type of code, not that one. I have two problems to manage at the same time, including this one.
0

User is offline   F!re-Fly 

#263

Thank again !

For sounds "RECOG" stop only for "ENEMYSTAYPUT" works like this:

appendevent EVENT_SOUND
  ife RETURN PRED_RECOG
  {
    ifspritepal 21
    ife sprite[].picnum LIZTROOPSTAYPUT
    set RETURN BLANK
  }
endevent


The problem is that it affects the main actor "LIZTROOP" like this:

actor LIZTROOPSTAYPUT TROOPSTRENGTH ATROOPSTAYSTAND
  ai AITROOPSEEKPLAYER
  cactor LIZTROOP
  cstat 257
enda


How to separate one actor from another? How not to take into account the value "cactor" ?
0

User is offline   F!re-Fly 

#264

The new "ATOMIC HEALH" aka "PEARL HEALTH" (only for Caribbean) is fixed !
0

User is online   Danukem 

  • Duke Plus Developer

#265

Are you saying that your current code prevents all LIZTROOP from making the recog sound, including those that are not stayput?
0

User is offline   F!re-Fly 

#266

Exactly! This happens for all Liztroop. My goal is just to stop this sound only for the "enemystayput"

So creating an army of silent monsters may be a good idea in some situations.
0

User is online   Danukem 

  • Duke Plus Developer

#267

appendevent EVENT_SOUND
  ife RETURN PRED_RECOG
  {
    ifspritepal 21
    ife sprite[].picnum LIZTROOPSTAYPUT
    set RETURN BLANK
  }
endevent


If this is the code you are using, then I do not understand why it would be cancelling the sound on all liztroops. It looks like it should only be cancelling it on LIZTROOPSTAYPUT. Also, I don't see the value in using the BLANK label here. Just set RETURN to -1. I wonder if you are setting RETURN on that sound somewhere else in your EVENT_SOUND code.
0

User is offline   F!re-Fly 

#268

The label "BLANK" was for me the only way to stop the sound so far. I had thought of the command "stopactorsound" but I never knew how to use it. I will test again and put only "RETURN -1"

You see this code in full, I did not add anything more.
0

User is offline   F!re-Fly 

#269

appendevent EVENT_SOUND
  ife RETURN PRED_RECOG
  {
    ifspritepal 21
    ife sprite[].picnum LIZTROOPSTAYPUT
    set RETURN -1
  }
endevent


Even with the modification, it refuses to stop the sound.
0

User is offline   F!re-Fly 

#270

New tests! I had the idea to use two different "ifspritepal" in the code:

appendevent EVENT_SOUND
  ife RETURN PRED_RECOG
  { ifspritepal 21
    ife sprite[].picnum LIZTROOPSTAYPUT
    set RETURN BLANK
  }
  ife RETURN PRED_RECOG
  { ifspritepal 22
    ife sprite[].picnum LIZTROOP
    set RETURN BLANK
  }
endevent


Results on a map: "LIZTROOP (pal 22)" has more sound (PRED_RECOG). "LIZTROOPSTAYPUT (pal 21)" still has the sound.

Now, I add the value "break" in the code:

appendevent EVENT_SOUND
  ife RETURN PRED_RECOG
  { ifspritepal 21
    ife sprite[].picnum LIZTROOPSTAYPUT
    set RETURN BLANK
  }
  ife RETURN PRED_RECOG
  { ifspritepal 22 break
    ife sprite[].picnum LIZTROOP
    set RETURN BLANK
  }
endevent


Results on the map: "LIZTROOP (pal 22)" still has the sound (PRED_RECOG). "LIZTROOPSTAYPUT (pal 21)" no longer has sound.

Conclusion: it works very well but only with two different "pal" There must be a way for this to work with all color palettes (0-25).
0

Share this topic:


  • 17 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • 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