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

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

  • 10 Pages +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • You cannot start a new topic
  • You cannot reply to this topic

CON coding problems.  "Improvements and progress."

User is offline   Firefly_Trooper 

  • 47

#211

COMMANDER CARI / FLYING FROSTY = move fixed !

There are two things left to settle.

1. Stop the attack when Duke is dead. Maybe I have to use this: "ifp pdead and break"

2. The monster does not stop anymore, even when Duke is far away and hidden (search stop). Maybe this?: "sleeptime"
0

User is offline   Darkus 

  • 308

#212

View PostFirefly_Trooper, on 01 April 2019 - 04:13 PM, said:

1. Stop the attack when Duke is dead. Maybe I have to use this: "ifp pdead and break"


It's better:
ifp palive { do things }


View PostFirefly_Trooper, on 01 April 2019 - 04:13 PM, said:

2. The monster does not stop anymore, even when Duke is far away and hidden (search stop). Maybe this?: "sleeptime"


I think "sleeptime" should work.
0

User is offline   Firefly_Trooper 

  • 47

#213

Yes, thanks.

I still have not been able to correct the two simple problems of King Cobra and Predator.

Otherwise, fixed the monsters codes of Nuclear.
0

User is offline   Firefly_Trooper 

  • 47

#214

The demo is finally over. I took the opportunity to correct some small bugs on the map. I will post it I hope at the end of the week.

Loading on YouTube is slow because the demo is between 6 and 10GB.

I also fixed the death of all the enemies of the expander weapon.
I removed the gamevar "KILLCOUNTFIX" inside the codes of the enemies, and I added it simply in the code EVENT_KILLIT. The value of the counter will be taken into account only when the enemies explodes.

Femcode fixed. It will just remain to add BDP women to reduce them to shrinker.

This post has been edited by Firefly_Trooper: 05 April 2019 - 08:45 AM

0

User is offline   Firefly_Trooper 

  • 47

#215

I would like to solve my first problem on my new switch. I tried this to make it work.

gamevar NEWSWITCH 0 2

onevent EVENT_LOADACTOR
  switch sprite[THISACTOR].picnum
  case PROTO_SLOTDOOR
    setvarvar NEWSWITCH sprite[THISACTOR].lotag
    getactor[THISACTOR].lotag 0
  break
  endswitch
endevent

useractor notenemy PROTO_SLOTDOOR
  ifpdistl 1024
  ifp pfacing
  ifhitspace
  {
    cactor 7029
    sound SWITCH_ON
    ifvarg NEWSWITCH 0 { operateactivators NEWSWITCH setvar NEWSWITCH 0 }
  }
enda

0

User is offline   Darkus 

  • 308

#216

You should implement animations with action.
Also don't set variable NEWSWITCH to 0 after use, if you want to use your switch several times.

EDIT: Here's a quick example, it should show you how using 'action' command, and also handle 'use' key (not tested)

action ASWITCHOFFA 0
action ASWITCHOFFB 0
action ASWITCHONA  1
action ASWITCHONB  1

useractor notenemy PROTO_SLOTDOOR
  ifaction 0 action ASWITCHOFFB
  ifpdistl 1024
  ifp pfacing
  {
    ifhitspace
    { ifaction ASWITCHOFFB
      { sound SWITCH_ON
        ifvarg NEWSWITCH 0 operateactivators NEWSWITCH 0
        action ASWITCHONA
      }
      else ifaction ASWITCHONB
      { sound SWITCH_ON
        ifvarg NEWSWITCH 0 operateactivators NEWSWITCH 0
        action ASWITCHOFFA
      }
    }
    else
    { ifaction ASWITCHOFFA
        action ASWITCHOFFB
      else ifaction ASWITCHONA
        action ASWITCHONB
    }
  }
enda


EDIT 2: Don't forget there's also operatemasterswitches


This post has been edited by Darkus: 07 April 2019 - 05:50 AM

0

User is offline   Firefly_Trooper 

  • 47

#217

Thank you again for your help. Once again, I fucked where it was obvious.
I completely forgot to add the actions.
Aside from that, I did my demo again in a 46-minute video and "fucking it was good" to play this game with all these patches and all the new additions, was an excellent experience. The game is even more awesome than in my memories lol.
Of course, there is still more to do. Once the video is published, I will share my files.
And all this is thanks to the community of the forum. Thanks guys !
0

User is offline   Firefly_Trooper 

  • 47

#218

The new switch works very well.
I have one last question for that. How to add a different sound in the hitag? Do we have to add a soundvar ?

How to also know the exact distance when activating a switch?
0

User is offline   Darkus 

  • 308

#219

View PostFirefly_Trooper, on 08 April 2019 - 08:07 AM, said:

How to add a different sound in the hitag? Do we have to add a soundvar ?


It's the same way you did with 'hitag' for dropping items, copy the value into the variable in 'EVENT_LOADACTOR', and play the sound using 'soundvar' with the variable

View PostFirefly_Trooper, on 08 April 2019 - 08:07 AM, said:

How to also know the exact distance when activating a switch?


ifpdistl should suffice. The more you increase the value, the more you can activate the switch from greater distance.
0

User is offline   Firefly_Trooper 

  • 47

#220

Thanks. ;)
0

User is offline   Firefly_Trooper 

  • 47

#221

I managed to solve other problems in the meantime.

Morter projectile of Captain Gorilla is fixed. It was a problem of clipdist.

Also RPG projectile of Mini-Battlelord is fixed.

Flying Frosty is fixed. He no longer attacks when Duke is dead, he moves without problems and he uses sleep in a natural way.
0

User is offline   Firefly_Trooper 

  • 47

#222

Commander Cari et Santa is not fixed.
0

User is offline   Firefly_Trooper 

  • 47

#223

It will remain the code of the controllable cameras to adjust.
0

User is offline   Firefly_Trooper 

  • 47

#224

View PostDarkus, on 09 April 2019 - 12:18 PM, said:

It's the same way you did with 'hitag' for dropping items, copy the value into the variable in 'EVENT_LOADACTOR', and play the sound using 'soundvar' with the variable



ifpdistl should suffice. The more you increase the value, the more you can activate the switch from greater distance.


I think I forgot something again.

I created this:

soundvar SOUNDSWITCH sprite [THISACTOR] .lotag

And I put it in this code:

onevent EVENT_LOADACTOR
  switch sprite[THISACTOR].picnum
  case PROTO_SLOTDOOR
  setvarvar PROTO_SLOTDOOR sprite[THISACTOR].lotag
  break
  endswitch
endevent


What is certain is that I misunderstood the instructions my dear Darkus.
0

User is offline   Firefly_Trooper 

  • 47

#225

Removed BLOOD and BLOODSPLATE, which is linked with the weapon "freezethrower" fixed.

This post has been edited by Firefly_Trooper: 11 April 2019 - 05:35 PM

0

User is offline   Firefly_Trooper 

  • 47

#226

A new, unsolved problem that has been going on for more than a month.

I would like to show items, when an object is destroyed (like sprites "CANWITHSOMETHING").

Is this the same procedure as the code "RESPAWN" with the value hitag ?

I would also like at the same time, generate a single item, when a monster is killed.

It is no longer "RESPAWN" with the hitag, but the lotag. As if an enemy killed already drop ammunition and weapons, except that I would like to assign a single item for a single monster / object.

:)
0

User is offline   Firefly_Trooper 

  • 47

#227

The "LIZMANSTAUPUT" and the "BOSS1STAYPUT" is fixed.

They were as "actor" and were invincible. Changed to "useractor"

This post has been edited by Firefly_Trooper: 18 April 2019 - 02:19 PM

0

User is offline   Firefly_Trooper 

  • 47

#228

New problem detected.

I have a clipdist problem with the BOSS. I would like to set a weak clipdist (value of 40 for example), so that they can be narrowed without problem and a higher clipdist (80) to prevent them from walking in narrow passages.

This problem goes back several months and I have not always thought about how to solve this problem.
0

User is offline   Firefly_Trooper 

  • 47

#229

Respawn code for the lotag is not work.

Boss clipdist problem is not work.
0

User is offline   Firefly_Trooper 

  • 47

#230

New fixed codes!

Small changes of quotes for weapons and items.

After making the code to make monsters appear, after killing them, I added the same function for all items that Duke picks up on the map.
0

User is offline   Firefly_Trooper 

  • 47

#231

New gameplay idea to set up.

The ability to open, close, activate or deactivate a door, when an enemy is killed or when an item is picked up.
0

User is offline   Firefly_Trooper 

  • 47

#232

It's good !


0

User is offline   Firefly_Trooper 

  • 47

#233

I still have not managed to disable the "stayput" monster recognition sounds

I tried a lot of methods without result. I tried this:

appendevent EVENT_RECOGSOUND
  ifactor OCTABRAIN
  {
    set RETURN -1
    stopsound OCTA_RECOG
  }
  ifactor OCTABRAINSTAYPUT
  {
    set RETURN -1
    stopsound OCTA_RECOG
  }
endevent


It works, except that the normal Octabrain also has no sound. I still have stopsoundvar, but I do not know how to use it.
0

User is offline   Firefly_Trooper 

  • 47

#234

Other problem for the "operateactivators"

When I kill an enemy, it locks or unblocks a door without any problem.

The only thing that does not work is when I use a lotag beyond 3. From "lotag 4", the sprite disappears.

The code:

gamevar OPERATEDOOR 0 2 // doors operate code (with monsters and items)

EVENT_LOADACTOR

setvarvar OPERATEDOOR sprite[THISACTOR].lotag

EVENT_KILLIT

ifvarg OPERATEDOOR 0 { operateactivators OPERATEDOOR 0 }


have I forgotten something?
0

User is offline   Firefly_Trooper 

  • 47

#235

I managed to add new sounds for my new switch, with a gamevar for the hitag.
The only concern is that the sound "SWITCH_ON" basic activates at the same time
0

User is offline   Firefly_Trooper 

  • 47

#236

Hello everyone! Back on the forum.

I will review the last problems that I gave up temporarily. I will start with the famous problem "RESPAWN" with the lotag.
0

User is offline   Firefly_Trooper 

  • 47

#237

Here is a summary of the codes "RESPAWN" that I managed to do, thanks to Darkus and Trooper Dan.

====01==== USE RESPAWN SPRITE

Method 01: appearance of monsters / items, when Duke kills an enemy (with hitag):

gamevar MRESPAWN 0 2

onevent EVENT_LOADACTOR // for enemy
setvarvar MRESPAWN sprite[THISACTOR].hitag
setactor[THISACTOR].hitag 0

onevent EVENT_KILLIT
ifvarg MRESPAWN 0 { operaterespawns MRESPAWN setvar MRESPAWN 0 }

// inside the enemy code for normal death with fast fire
ifvarg MRESPAWN 0 { operaterespawns MRESPAWN setvar MRESPAWN 0 }


Method 02: appearance of monsters / items, when Duke finds a weapon, ammo and other items (with hitag):

gamevar ORESPAWN 0 2

onevent EVENT_LOADACTOR // for items
setvarvar ORESPAWN sprite[THISACTOR].hitag

// inside the items code
ifvarg ORESPAWN 0 { operaterespawns ORESPAWN setvar ORESPAWN 0 }


====02==== NOT USE RESPAWN SPRITE

Method 03: appearance of monsters / items and opening doors, when Duke kills an enemy or finds an item at random (with lotag):

gamevar OPERATEDOOR 0 2

onevent EVENT_LOADACTOR
setvarvar OPERATEDOOR sprite[THISACTOR].lotag

onevent EVENT_KILLIT
ifvarg OPERATEDOOR 0 { operateactivators OPERATEDOOR 0 }

// inside the monsters / items code
ifvarg OPERATEDOOR 0 { operateactivators OPERATEDOOR 0 }


t is precisely this method 03 that does not work correctly with the lotag. When I use a lotag beyond 5 or 6, the code stops working.

I would like to use something specific with this third method. Displaying an item directly on the killed enemy / object (trash or xmas tree) and not with the sprite "RESPAWN" the item that drops the enemy / object killed, is similar when they drop weapons or ammunition.

I would also like to be able to activate several doors to open or close, with this same code.

Here I think I have been pretty clear about my explanations.

This post has been edited by Firefly_Trooper: 04 June 2019 - 04:55 PM

0

User is offline   Firefly_Trooper 

  • 47

#238

Good evening friends ! Are you ready to help me again to improve this project? I decided to return to service.

I had even the idea to define the size of the sprite BLOODPOOL about the shrinkage with the shrinker.

But before approaching that, I wish I could finish the coding of RESPAWN.
0

User is offline   Firefly_Trooper 

  • 47

#239

Lotag respawn codes is fixed !

I proceeded like this:

gamevar L_RESPAWN 0 2 // lotag "RESPAWN" for all monsters / items

state lotag_code // special lotag "RESPAWN" code
  {
    getactor[THISACTOR].lotag OPERATEDOOR
    getactor[THISACTOR].lotag L_RESPAWN
    setactor[THISACTOR].lotag 0
  }
ends

state lotag_code_items
  ifvare L_RESPAWN 21 { spawn FIRSTGUNSPRITE }
  ifvare L_RESPAWN 22 { spawn CHAINGUNSPRITE }
  ifvare L_RESPAWN 23 { spawn RPGSPRITE }
  ifvare L_RESPAWN 24 { spawn FREEZESPRITE }
  ifvare L_RESPAWN 25 { spawn SHRINKERSPRITE }
  ifvare L_RESPAWN 26 { spawn HEAVYHBOMB }
  ifvare L_RESPAWN 27 { spawn TRIPBOMBSPRITE }
  ifvare L_RESPAWN 28 { spawn SHOTGUNSPRITE }
  ifvare L_RESPAWN 29 { spawn DEVISTATORSPRITE }
  ifvare L_RESPAWN 32 { spawn GROWSPRITE }
  ifvare L_RESPAWN 37 { spawn FREEZEAMMO }
  ifvare L_RESPAWN 40 { spawn AMMO }
  ifvare L_RESPAWN 41 { spawn BATTERYAMMO }
  ifvare L_RESPAWN 42 { spawn DEVISTATORAMMO }
  ifvare L_RESPAWN 44 { spawn RPGAMMO }
  ifvare L_RESPAWN 45 { spawn GROWAMMO }
  ifvare L_RESPAWN 46 { spawn CRYSTALAMMO }
  ifvare L_RESPAWN 47 { spawn HBOMBAMMO }
  ifvare L_RESPAWN 48 { spawn AMMOLOTS }
  ifvare L_RESPAWN 49 { spawn SHOTGUNAMMO }
  ifvare L_RESPAWN 51 { spawn COLA }
  ifvare L_RESPAWN 52 { spawn SIXPAK }
  ifvare L_RESPAWN 53 { spawn FIRSTAID }
  ifvare L_RESPAWN 54 { spawn SHIELD }
  ifvare L_RESPAWN 55 { spawn STEROIDS }
  ifvare L_RESPAWN 56 { spawn AIRTANK }
  ifvare L_RESPAWN 57 { spawn JETPACK }
  ifvare L_RESPAWN 59 { spawn HEATSENSOR }
  ifvare L_RESPAWN 60 { spawn ACCESSCARD }
  ifvare L_RESPAWN 61 { spawn BOOTS }
  ifvare L_RESPAWN 100 { spawn ATOMICHEALTH }
  ifvare L_RESPAWN 101 { espawn ACCESSCARD setactor[RETURN].pal 21 }
  ifvare L_RESPAWN 102 { espawn ACCESSCARD setactor[RETURN].pal 23 }
ends

eventloadactor LIZTROOP // special lotag "RESPAWN" code for all enemies
  state lotag_code
enda
eventloadactor LIZTROOPRUNNING
  state lotag_code
enda
eventloadactor LIZTROOPSTAYPUT
  state lotag_code
enda
eventloadactor LIZTROOPSHOOT
  state lotag_code
enda
eventloadactor LIZTROOPJETPACK
  state lotag_code
enda
eventloadactor LIZTROOPONTOILET
  state lotag_code
enda
eventloadactor LIZTROOPJUSTSIT
  state lotag_code
enda
eventloadactor LIZTROOPDUCKING
  state lotag_code
enda

state lotag_code_items // inside the Liztroop's code, for the various death


It works very well and it avoids copying the long list of items. It just misses the command "break" to avoid showing an item, when a monster is shrunk.

This post has been edited by Firefly_Trooper: 17 June 2019 - 09:49 AM

0

User is online   Mark 

  • Honored Donor
  • 2,943

#240

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

Share this topic:


  • 10 Pages +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Fury! ;) © 2019 Voidpoint, LLC

Enter your sign in name and password


Sign in options