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

Jump to content

  • 17 Pages +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

CON coding problems.  "Improvements and progress."

User is offline   F!re-Fly 

#361

The solution should be this: knucles_incs

I will test this
0

User is offline   Danukem 

  • Duke Plus Developer

#362

setp[].knuckle_incs 0
0

User is offline   F!re-Fly 

#363

View PostTrooper Dan, on 14 January 2020 - 02:03 PM, said:

setp[].knuckle_incs 0


Ok thank!

I will also find a way to stop the display of the "dead" icon when Duke is frozen "ifp pstand" and shrunk "ifp pshrunk"

To be tested either in an event or in the Aplayer code
0

User is offline   F!re-Fly 

#364

I tested "setp []. Knuckle_incs 0" in my code and it works, except that the animation of crunches is not played. Also, it doesn't work when duke is impatient.

here is a piece of code:

state weapons_icon // world tour hud tiles
  ifp palive
  {
    ifvare currentweapon 0 // knee weapon
    {
      rotatesprite -40 40 65536 0 WEAPON_TILE01 0 0 0 0 0 xdim ydim // "KNEE" icon screen
    }
  }
  else
  {
    rotatesprite -40 40 65536 0 WEAPON_TILE00 0 0 0 0 0 xdim ydim // not weapon icon screen
  }
ends

onevent EVENT_DISPLAYREST
  state weapons_icon
endevent

0

User is offline   F!re-Fly 

#365

Tile 2529 fixed! The recharge animation was badly cut.

Added the ability to destroy Duke's corpse.

New frames for the Liztroop:

Unused frames attack (tile 1700) and associated with a new actor.

Different death frames, when frozen, shrunk and enlarged with the microwave (SUFFERING, ONTOILET, JUSTSIT, JETPACK and DUCKING).
0

User is offline   F!re-Fly 

#366

King Cobra and Captain Gorilla have been reworked ! Adding a missing frame and repositioning the tiles in order.
0

User is offline   Mark 

#367

When you finally release your mod you are going to need a new keyboard after typing in the loooong list of things it does. :rolleyes:
0

User is offline   F!re-Fly 

#368

View PostMark, on 18 January 2020 - 02:17 PM, said:

When you finally release your mod you are going to need a new keyboard after typing in the loooong list of things it does. :rolleyes:


Yes it is certainly very long, but so good. I should actually have a huge keyboard.

Most of the code is mostly correction. I hadn't even seen that some old enemies added, were badly arranged in the game.

The next demo of the mod is coming soon.
0

User is offline   F!re-Fly 

#369

View PostTrooper Dan, on 14 January 2020 - 02:03 PM, said:

setp[].knuckle_incs 0


TD, I still haven't found a reliable solution for the thumbnails. I believe that I have not sufficiently located the source of the problem.
0

User is offline   F!re-Fly 

#370

View PostMark, on 18 January 2020 - 02:17 PM, said:

When you finally release your mod you are going to need a new keyboard after typing in the loooong list of things it does. :rolleyes:


Mark! Do you remember that you told me about a code that would increase the boss clipdist? Well I will add this solution in my coding, compared to what you had suggested to me.
0

User is offline   Danukem 

  • Duke Plus Developer

#371

View PostFirefly Trooper, on 20 January 2020 - 05:00 AM, said:

TD, I still haven't found a reliable solution for the thumbnails. I believe that I have not sufficiently located the source of the problem.


I really don't know what you are referring to but that command you quoted simply resets the knuckle cracking timer, as explained in the wiki.
0

User is offline   F!re-Fly 

#372

Yes, I also read it in the wiki. I think I was wrong in my explanation. I will submit another example soon. While waiting for other answers, I will solve some problems alone.

I managed to add a new actor linked to Pigcop. He can now attack the player directly standing (an alternative to the lying Pigcop). The solution was actually very simple and I had complicated my work for nothing. The Lizman will also have the same example.

My next request will be linked to the various Liztroop deaths, linked to three specific weapons.

This post has been edited by Firefly Trooper: 21 January 2020 - 10:11 AM

0

User is offline   F!re-Fly 

#373

I will try one last thing. I have a piece of code to allow Duke to activate the night vision goggles, in order to make invisible enemies appear.

Gamevar position 0 2
Gamevar pal 0 2
Gamevar temp 0 0

setactor[THISACTOR].mdflags 16 // actor code exemple

  setvar position 32768
  ifvare pal 6 spritepal 6
  ifspritepal 6
  {
    getplayer[THISACTOR].heat_on temp
    ifvare temp 0 break
  }

state invisiblecode
  ifspritepal 11
  cstat 33024
  break
ends

onevent EVENT_SPAWN // invisible monsters
  { switch sprite[THISACTOR].picnum
  case LIZTROOP
  case LIZTROOPRUNNING
  case LIZTROOPSTAYPUT
  case LIZTROOPSHOOT
  case LIZTROOPJETPACK
  case LIZTROOPONTOILET
  case LIZTROOPJUSTSIT
  case LIZTROOPDUCKING
    ifspritepal 11
    cstat 33024
  break
  endswitch
  }
endevent


But it doesn't work. Did I do a wrong thing?
0

User is offline   F!re-Fly 

#374

Still failed to make invisible enemies appear only with night vision goggles.
0

User is offline   F!re-Fly 

#375

Hi Trooper Dan! I would need your help. A long time ago thanks to Markus, I was able to make sure that the monsters killed, could generate items or open doors:

gamevar OPERATES 0 2 // doors and sectors operating, with all monsters / items

state lotag_operates_code
  {
    getactor[THISACTOR].lotag OPERATES
    getactor[THISACTOR].lotag L_RESPAWN2
    setactor[THISACTOR].lotag 0
  }
ends

ifvarg OPERATES 0 { operateactivators OPERATES 0 } // inside the liztroop code

eventloadactor LIZTROOP
  state lotag_operates_code
enda


This code works very well with a single killed monster. Now, I would like to do the same thing, but with several monsters to kill:

gamevar MULTIOPERATES 0 2
gamevar OPFIX 0 0

state multi_operates_code
  {
    getactor[THISACTOR].lotag MULTIOPERATES
    getactor[THISACTOR].lotag L_RESPAWN3
    setactor[THISACTOR].lotag 0
    setactor[THISACTOR].hitag OPFIX
  }
ends

ifvarg MULTIOPERATES 0 { operatemasterswitches MULTIOPERATES setvar OPFIX 0 }

eventloadactor LIZTROOP
  state multi_operates_code
enda


I would like for example that the "gamevar OPFIX" can be the same hitag value, exactly as if it were the operation "operatemasterswitches" as in "E1L2"

Is the line "setactor [THISACTOR] .hitag OPFIX" in the "state multi_operates_code" correct?

This post has been edited by Firefly Trooper: 02 February 2020 - 03:39 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#376

I'm not going to post more code for you so that you can randomly change it and paste it around without understanding it and then come back a few days later asking why it doesn't work. Your latest post about the nightvision goggle thing illustrates this phenomenon very well.
1

User is offline   F!re-Fly 

#377

View PostTrooper Dan, on 02 February 2020 - 05:23 PM, said:

I'm not going to post more code for you so that you can randomly change it and paste it around without understanding it and then come back a few days later asking why it doesn't work. Your latest post about the nightvision goggle thing illustrates this phenomenon very well.


...Not even a clue? I have been trying to fend for myself for everything for some time and it is more difficult. However, I try to apply and integrate everything that I have already been told.
0

User is offline   F!re-Fly 

#378

Dan, I have two more questions. Sorry to annoy you but I need to progress despite everything. This time it's based on a request. Is there a sample script for RECON and GREENSLIME? I also noticed that if we give a different spritepal to RECON, it disappears from the map.

Thank you!
0

User is offline   Jimmy 

  • Let's go Brandon!

#379

RECON and GREENSLIME are hardcoded ACTORs (ie: in the source of the game, not the CONs.) You can insert code through EVENTs but your mileage may vary. Even in 1.5 CON limitations there can be ways to make things happen at specific situations, but it's very hacky and not recommended for beginners. (Plus, who is making 1.5 mods?) Depending on what you want to do, a modder might be better off coding new ACTORs to replace the old ones.

As for Dan refusing to help you further, I can't blame him. You're not learning the programming language. CON is rudimentary, but reads like any other language; English, Spanish, etc. It has a logical flow and method to creating outcomes. A line of code reads like a sentence. What you've been doing very often is like speaking in vague copied phrases and expecting outcomes. I will dub this "Darmok and Jalad at the Terminal". You need to slow down on the advanced and intermediate stuff and really learn how to code from the ground up, otherwise you'll never understand why your code does or doesn't work. Most programmers rarely need to outside help to figure out why simple stuff like this doesn't work, because like I said, there's a logical flow to the language. You need to understand why things work.

This post has been edited by Jimmy: 04 February 2020 - 02:19 PM

0

User is offline   F!re-Fly 

#380

View PostJimmy, on 04 February 2020 - 02:10 PM, said:

RECON and GREENSLIME are hardcoded ACTORs (ie: in the source of the game, not the CONs.) You can insert code through EVENTs but your mileage may vary. Even in 1.5 CON limitations there can be ways to make things happen at specific situations, but it's very hacky and not recommended for beginners. (Plus, who is making 1.5 mods?) Depending on what you want to do, a modder might be better off coding new ACTORs to replace the old ones.


I totally understand. The goal is to add certain things, because for example adding a carcass of a RECON that crashes to the ground, or that a GREENSLIME can generate certain items. Even when a RECON crashes to the ground, the pilot never dies. It would be nice if that could be the case, just like tanks.
0

User is offline   Jimmy 

  • Let's go Brandon!

#381

That is very easily done. My previous post gives you all the information you need to figure out how to do that.
0

User is offline   F!re-Fly 

#382

View PostJimmy, on 04 February 2020 - 02:22 PM, said:

That is very easily done. My previous post gives you all the information you need to figure out how to do that.


I do have my own idea of ​​how to do it. I had tested the GREENSLIME case, except that the sprite remained blocked and did not disappear from the game once killed.
0

User is offline   F!re-Fly 

#383

I had added a new turret which attacks faster than the base and I realized that the player could not hit the target at all, with the hitscan "SHOTSPARK1" projectile. Could this code solve the problem with this code? I would like it to be exactly like the first turret.

onevent EVENT_GETSHOTRANGE

    ifvare player[THISACTOR].curr_weapon PISTOL_WEAPON
    {
        setvar ANGRANGE 0
        setvar ZRANGE 0
    }

endevent


This post has been edited by Firefly Trooper: 22 February 2020 - 11:35 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#384

The player cannot hit the turret at all?
0

User is offline   F!re-Fly 

#385

View PostTrooper Dan, on 22 February 2020 - 11:53 AM, said:

The player cannot hit the turret at all?


Yes exactly ! Even by modifying the clipdist, it didn't work.

However, I just managed to correctly set the cstat when it is on the ceiling and stop the command "fall"
0

User is offline   Danukem 

  • Duke Plus Developer

#386

If you can't hit the turret with bullets AT ALL, then something is fundamentally wrong and having more accurate bullets won't help.
0

User is offline   F!re-Fly 

#387

View PostTrooper Dan, on 22 February 2020 - 03:41 PM, said:

If you can't hit the turret with bullets AT ALL, then something is fundamentally wrong and having more accurate bullets won't help.


Surely the size of the sprite has something to do with it.
0

User is offline   F!re-Fly 

#388

I checked the size of the sprite, this is not the cause of the problem. By dint of accumulating shit problems, this project will never be finished. It's just annoying. I'm going to do easy things in the meantime
0

User is offline   Danukem 

  • Duke Plus Developer

#389

Put the sprite in the middle of the air in mapster (not next to the ceiling), make it big enough, make sure it has cstator 256, turn off autoaim, and then aim everywhere around the sprite to see if it hits.
0

User is offline   F!re-Fly 

#390

View PostTrooper Dan, on 24 February 2020 - 03:28 PM, said:

Put the sprite in the middle of the air in mapster (not next to the ceiling), make it big enough, make sure it has cstator 256, turn off autoaim, and then aim everywhere around the sprite to see if it hits.


I tested the options without "auto aim" and it works very well. However, two last things: only the pistol refuses to operate in "auto aim" and the turret attached to the ceiling, shoot ... In the ceiling! Projectiles do not descend in correct alignment to the target (the player).

by increasing a little "sizeat" ​​by more than "40 40" everything works fine in the end. Is there a way around your sprite size which is not always dependent on its cutting ?

This post has been edited by Firefly Trooper: 29 February 2020 - 02:51 AM

0

Share this topic:


  • 17 Pages +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • 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