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!

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

CON coding problems.  "Improvements and progress."

User is offline   Firefly_Trooper 

  • 41

#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 

  • 307

#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 

  • 41

#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 

  • 41

#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 

  • 41

#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 

  • 307

#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 

  • 41

#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 

  • 41

#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 

  • 307

#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 

  • 41

#220

Thanks. ;)
0

User is offline   Firefly_Trooper 

  • 41

#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 

  • 41

#222

Commander Cari et Santa is not fixed.
0

User is offline   Firefly_Trooper 

  • 41

#223

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

User is offline   Firefly_Trooper 

  • 41

#224

 Darkus, 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 

  • 41

#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 

  • 41

#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 

  • 41

#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 

  • 41

#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 

  • 41

#229

Respawn code for the lotag is not work.

Boss clipdist problem is not work.
0

User is offline   Firefly_Trooper 

  • 41

#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 

  • 41

#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 

  • 41

#232

It's good !


0

User is offline   Firefly_Trooper 

  • 41

#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 

  • 41

#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 

  • 41

#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

Share this topic:


  • 8 Pages +
  • « First
  • 6
  • 7
  • 8
  • 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 Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options