CON coding problems. "Improvements and progress."
#451 Posted 27 March 2020 - 01:33 PM
#452 Posted 28 March 2020 - 12:41 AM
F!re-Fly, on 25 March 2020 - 06:11 AM, said:
action NUKEBUTTONDNA_SWITCHONA 1
action NUKEBUTTONDNA_SWITCHONB 1
action NUKEBUTTONDNA_SWITCHOFFA 0
action NUKEBUTTONDNA_SWITCHOFFB 0
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifpdistl 1309
ifp pfacing
{
ifhitspace
{ ifaction NUKEBUTTONDNA_SWITCHOFFB
{ sound SWITCH_ON
ifvarg NEWSWITCHDOOR 0 { operateactivators NEWSWITCHDOOR 0 }
ifvarg SOUNDSWITCH 0 { stopsoundvar SWITCH_ON soundvar SOUNDSWITCH }
action NUKEBUTTONDNA_SWITCHONA
break
}
else ifaction NUKEBUTTONDNA_SWITCHONB
{ sound SWITCH_ON
ifvarg NEWSWITCHDOOR 0 { operateactivators NEWSWITCHDOOR 0 }
ifvarg SOUNDSWITCH 0 { stopsoundvar SWITCH_ON soundvar SOUNDSWITCH }
action NUKEBUTTONDNA_SWITCHOFFA
break
}
}
else
{ ifaction NUKEBUTTONDNA_SWITCHOFFA
action NUKEBUTTONDNA_SWITCHOFFB
else ifaction NUKEBUTTONDNA_SWITCHONA
action NUKEBUTTONDNA_SWITCHONB
}
}
endaAll this works very well and the doors open very well. Only, I can not make it so that the switch can not come to life, only when it is not assigned to a lotag. Did I misplace any order?
Does anyone have an idea to solve this little problem?
#453 Posted 28 March 2020 - 04:21 AM
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
enda
#454 Posted 28 March 2020 - 11:25 AM
Darkus, on 28 March 2020 - 04:21 AM, said:
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
endaHello Darkus! The code does not work. I had the same problem with the break commands placed as well. The switch trips automatically and without any interruptions when Duke approaches it.
#455 Posted 28 March 2020 - 11:57 AM
Also, added stopsound to prevent player making grunts. It should work for good now.
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
ifhitspace
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
stopsound DUKE_SEARCH stopsound DUKE_SEARCH2
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
enda
#456 Posted 28 March 2020 - 01:18 PM
Darkus, on 28 March 2020 - 11:57 AM, said:
Also, added stopsound to prevent player making grunts. It should work for good now.
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
ifhitspace
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
stopsound DUKE_SEARCH stopsound DUKE_SEARCH2
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
endaIt still does not work. The switch without any "lotag" still works, with "action" on. I admit that I don't understand what's going on.
#457 Posted 28 March 2020 - 01:26 PM
Add this into your code:
onevent EVENT_LOADACTOR
ifactor NUKEBUTTON_DNA
{ getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag SOUNDSWITCH
setactor[THISACTOR].hitag 0
}
endevent
#458 Posted 28 March 2020 - 01:32 PM
Darkus, on 28 March 2020 - 01:26 PM, said:
Add this into your code:
onevent EVENT_LOADACTOR
ifactor NUKEBUTTON_DNA
{ getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag SOUNDSWITCH
setactor[THISACTOR].hitag 0
}
endeventI had this:
// new switch code
gamevar NEWSWITCHDOOR 0 2
gamevar SOUNDSWITCH 0 2
/*------------*/
/* V0.99 BETA */
/*------------*/
state newswitch_code
{
getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
}
ends
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case FLICKERINGREDBUTTON
case PROTO_SLOTDOOR
case BDP_SLOT1
case BDP_SLOT2
case NUKEBUTTON_DNA
case AREA51_SWITCH
case ALIENSHIP_SWITCH
case EGYPT_SWITCH
case LEVEL_SWITCH
setvarvar SOUNDSWITCH sprite[THISACTOR].hitag
setactor[THISACTOR].hitag 0
break
endswitch
endevent
eventloadactor NUKEBUTTON_DNA
state newswitch_code
enda
This post has been edited by F!re-Fly: 28 March 2020 - 01:40 PM
#459 Posted 28 March 2020 - 01:48 PM
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case FLICKERINGREDBUTTON
case PROTO_SLOTDOOR
case BDP_SLOT1
case BDP_SLOT2
case NUKEBUTTON_DNA
case AREA51_SWITCH
case ALIENSHIP_SWITCH
case EGYPT_SWITCH
case LEVEL_SWITCH
state newswitch_code
getactor[THISACTOR].hitag SOUNDSWITCH
setactor[THISACTOR].hitag 0
break
endswitch
endevent
#460 Posted 28 March 2020 - 01:55 PM
Darkus, on 28 March 2020 - 01:48 PM, said:
I hope that's not true. Lots of mods use it.
It's good for readability and portability. I can bundle both the actor code and the eventloadactor code in one place, read it all together, or drop it into a different mod. Then I don't have to search a different file for whether that actor gets mentioned in EVENT_LOADACTOR. Yes, one could use appendevent EVENT_LOADACTOR to keep the code together, but that's not quite the same. For example, it's possible that the code earlier in the event has a break or return, and in that case your appended code won't work (I'm assuming that the append literally appends the code and doesn't run it as a separate instance.)
#461 Posted 28 March 2020 - 02:01 PM
Trooper Dan, on 28 March 2020 - 01:55 PM, said:
It's good for readability and portability. I can bundle both the actor code and the eventloadactor code in one place, read it all together, or drop it into a different mod. Then I don't have to search a different file for whether that actor gets mentioned in EVENT_LOADACTOR. Yes, one could use appendevent EVENT_LOADACTOR to keep the code together, but that's not quite the same. For example, it's possible that the code earlier in the event has a break or return, and in that case your appended code won't work (I'm assuming that the append literally appends the code and doesn't run it as a separate instance.)
I also hope the same, because if not, a good part of my code will be ruined. From my memories of past sons, Trooper Dan or Darkus (definitely see you two), suggested that I use eventloadactor. I used it for the famous coding "lotag respawn" for the items and it worked very well and I also never had a performance problem (lotag 4 skill).
#463 Posted 28 March 2020 - 02:14 PM
Darkus, on 28 March 2020 - 02:08 PM, said:
I had read this page. It is true that it is still functional now, finally it works birn for me. If that’s all truth, I wouldn’t really care. I have assigned "eventloadactor" only for switches and respawn coding.
I will however continue my work on DNA and will post the demo of the mod very soon.
For this switch problem, I tried "EVENT_LOADACTOR" and I meet the same shit.
#464 Posted 28 March 2020 - 02:34 PM
gamevar NEWSWITCHDOOR 0 2
gamevar SOUNDSWITCH 0 2
state newswitch_code
{
getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
}
ends
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
ifhitspace
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
stopsound DUKE_SEARCH stopsound DUKE_SEARCH2
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
enda
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case FLICKERINGREDBUTTON
case PROTO_SLOTDOOR
case BDP_SLOT1
case BDP_SLOT2
case NUKEBUTTON_DNA
case AREA51_SWITCH
case ALIENSHIP_SWITCH
case EGYPT_SWITCH
case LEVEL_SWITCH
state newswitch_code
getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag SOUNDSWITCH
setactor[THISACTOR].hitag 0
break
endswitch
endevent
This post has been edited by F!re-Fly: 28 March 2020 - 02:34 PM
#465 Posted 28 March 2020 - 02:44 PM
#466 Posted 28 March 2020 - 03:18 PM
Darkus, on 28 March 2020 - 02:44 PM, said:
That is true! In the rush, I forgot this detail. I will test this for tomorrow. Thank you !
#467 Posted 28 March 2020 - 11:18 PM
Darkus, on 28 March 2020 - 02:44 PM, said:
I tried again and nothing helped! It's always the same result.
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
ifhitspace
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
stopsound DUKE_SEARCH stopsound DUKE_SEARCH2
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
enda
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
// case FLICKERINGREDBUTTON
// case PROTO_SLOTDOOR
// case BDP_SLOT1
// case BDP_SLOT2
case NUKEBUTTON_DNA
// case AREA51_SWITCH
// case ALIENSHIP_SWITCH
// case EGYPT_SWITCH
// case LEVEL_SWITCH
getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag SOUNDSWITCH
setactor[THISACTOR].hitag 0
break
endswitch
endevent
#468 Posted 29 March 2020 - 05:32 AM
#469 Posted 29 March 2020 - 06:44 AM
Darkus, on 29 March 2020 - 05:32 AM, said:
Mmmh ok! In general, I do this: 0,1 lotag (active switch) and 0,0 (inactive switch).
#470 Posted 29 March 2020 - 11:09 AM
Darkus, on 29 March 2020 - 05:32 AM, said:
Sorry Darkus for bothering you with this again, but now I don't understand what's going on. However, I put the code well as you had suggested:
gamevar NEWSWITCHDOOR 0 2
gamevar SOUNDSWITCH 0 2
action NUKEBUTTONDNA_SWITCHONA 1
action NUKEBUTTONDNA_SWITCHONB 1
action NUKEBUTTONDNA_SWITCHOFFA 0
action NUKEBUTTONDNA_SWITCHOFFB 0
useractor notenemy NUKEBUTTON_DNA
ifaction 0 action NUKEBUTTONDNA_SWITCHOFFB
ifaction NUKEBUTTONDNA_SWITCHOFFA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHOFFB
}
else ifaction NUKEBUTTONDNA_SWITCHONA
{ ifhitspace break
action NUKEBUTTONDNA_SWITCHONB
}
else
{ ifpdistl 1309
ifp pfacing
ifcansee
ifhitspace
{ ifvarg NEWSWITCHDOOR 0 operateactivators NEWSWITCHDOOR 0
ifvarg SOUNDSWITCH 0 soundvar SOUNDSWITCH
else sound SWITCH_ON
stopsound DUKE_SEARCH stopsound DUKE_SEARCH2
ifaction NUKEBUTTONDNA_SWITCHOFFB action NUKEBUTTONDNA_SWITCHONA
else ifaction NUKEBUTTONDNA_SWITCHONB action NUKEBUTTONDNA_SWITCHOFFA
}
}
enda
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case NUKEBUTTON_DNA
getactor[THISACTOR].lotag NEWSWITCHDOOR
setactor[THISACTOR].lotag 0
getactor[THISACTOR].hitag SOUNDSWITCH
setactor[THISACTOR].hitag 0
break
endswitch
endeventAnd I did put 0.1 for an active switch. The second inactive switch has nothing in lotag. I do not understand at all why this is not wanted. Maybe giving me an example of how you did it could help me fix this problem. Do you think it could interfere with other "eventloadactor" present in the global code?
#473 Posted 03 April 2020 - 03:09 AM
But obviously, when I wanted to redo all the famous code "lotag et respawn" I found the same old problem as before. first of all, this is how my code was before:
gamevar L_RESPAWN 0 2
gamevar L_RESPAWN2 0 2
gamevar H_RESPAWN 0 2
gamevar OPERATES 0 2
state respawnitems // respawn items
{
getactor[THISACTOR].lotag L_RESPAWN
setactor[THISACTOR].lotag 0
}
ends
state lotag_operates_code // open / close doors
{
getactor[THISACTOR].lotag OPERATES
getactor[THISACTOR].lotag L_RESPAWN2
setactor[THISACTOR].lotag 0
}
ends
state respawnitems // part of the code where the enemy generates an item when he is killed
ifvare L_RESPAWN 15 { espawnvar ACCESSCARD setactor[RETURN].pal 21 }
else ifvare L_RESPAWN 16 { espawnvar ACCESSCARD setactor[RETURN].pal 23 }
else espawnvar L_RESPAWN
ends
state checktroophit // part of the code where the enemy is killed
state respawnitems
ifvarg H_RESPAWN 0 { operaterespawns H_RESPAWN setvar H_RESPAWN 0 }
ifvarg OPERATES 0 { operateactivators OPERATES 0 }
sound PRED_DYING
addkills 1
addvar KILLCOUNTFIX 1
setvar ISDEADFIX 1
ends
eventloadactor LIZTROOP
state lotag_code
enda
eventloadactor LIZTROOP
state lotag_operates_code
enda
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case LIZTROOP
setvarvar H_RESPAWN sprite[THISACTOR].hitag
setactor[THISACTOR].hitag 0
break
endswitch
endevent
onevent EVENT_KILLIT
ifvarn MONSTERS_OFF 1
{
switch sprite[THISACTOR].picnum
case LIZTROOP
ifvare ISDEADFIX 0
addvar KILLCOUNTFIX 1
ifvarg H_RESPAWN 0 { operaterespawns H_RESPAWN setvar H_RESPAWN 0 }
ifvarg OPERATES 0 { operateactivators OPERATES 0 }
break
endswitch
}
endeventNote that I had created the gamevar "L_RESPAWN2" so that the two actions are taken into account (items that appear and door opening).
And now, I use the code as Darkus had suggested to me:
gamevar L_RESPAWN 0 2
gamevar L_RESPAWN2 0 2
gamevar H_RESPAWN 0 2
gamevar OPERATES 0 2
state respawnitems
ifvare L_RESPAWN 15 { espawnvar ACCESSCARD setactor[RETURN].pal 21 }
else ifvare L_RESPAWN 16 { espawnvar ACCESSCARD setactor[RETURN].pal 23 }
else espawnvar L_RESPAWN
ends
state checktroophit
state respawnitems
ifvarg H_RESPAWN 0 { operaterespawns H_RESPAWN setvar H_RESPAWN 0 }
ifvarg OPERATES 0 { operateactivators OPERATES 0 }
sound PRED_DYING
addkills 1
addvar KILLCOUNTFIX 1
setvar ISDEADFIX 1
ends
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case LIZTROOP
getactor[THISACTOR].lotag L_RESPAWN
getactor[THISACTOR].lotag L_RESPAWN2
getactor[THISACTOR].lotag OPERATES
setactor[THISACTOR].lotag 0
break
endswitch
endevent
onevent EVENT_KILLIT
ifvarn MONSTERS_OFF 1
{
switch sprite[THISACTOR].picnum
case LIZTROOP
ifvare ISDEADFIX 0
addvar KILLCOUNTFIX 1
ifvarg H_RESPAWN 0 { operaterespawns H_RESPAWN setvar H_RESPAWN 0 }
ifvarg OPERATES 0 { operateactivators OPERATES 0 }
break
endswitch
}
endeventAnd the problem is that I can no longer define in the game, the two possibilities. I still end up with this problem here:
When an enemy has all of this code and is killed in the air, the platforms react as if they were doors or elevators.
I noticed that it affected the enemies who had a lotage of 1 to 3, that is to say the skill level.
This is the current problem!
This post has been edited by F!re-Fly: 03 April 2020 - 03:19 AM
#474 Posted 11 April 2020 - 03:24 PM
state respawnitems
ifvare L_RESPAWN 15 { espawnvar ACCESSCARD setactor[RETURN].pal 21 }
else ifvare L_RESPAWN 16 { espawnvar ACCESSCARD setactor[RETURN].pal 23 }
else ifvare L_RESPAWN 0 break
else ifvare L_RESPAWN 1 break
else ifvare L_RESPAWN 2 break
else ifvare L_RESPAWN 3 break
else ifvare L_RESPAWN 4 break
else espawnvar L_RESPAWN
endsThis also fixes a recent improvement in Darkus:
// fix radius damage to inactive actors (statnum 2) which is handled differently
state overrideexpldamagefix
switch sprite[THISACTOR].htpicnum
case HEAVYHBOMB
case OOZFILTER
case EXPLODINGBARREL
case SEENINE
case MORTER
case CANNONBALL
case 1818 // CANNONBALLS
case DRONE
case TANK
case TRIPBOMB
case GUNPOWDERBARREL
setactor[THISACTOR].htpicnum RADIUSEXPLOSION
break
endswitch
endsWhen inactive enemies were killed with this code, the lotag "0" was buggy and Eduke32 stopped working.
So I have (I think I haven't made a mistake yet), correctly put the code like this:
onevent EVENT_LOADACTOR
switch sprite[THISACTOR].picnum
case LIZTROOP
getactor[THISACTOR].hitag OPERATES
getactor[THISACTOR].lotag L_RESPAWN
setactor[THISACTOR].hitag ZERO
setactor[THISACTOR].lotag ZERO
break
endswitch
endeventSomeone here will tell me if the latter solution is correct, or if there is another solution.
Thanks for confirming me guys!
#476 Posted 17 April 2020 - 09:41 AM
defineprojectile PROTO_JIBS5 PROJ_WORKSLIKE 6274
defineprojectile PROTO_JIBS5 PROJ_SPAWNS -1
defineprojectile PROTO_JIBS5 PROJ_VEL 110
defineprojectile PROTO_JIBS5 PROJ_EXTRA 0
defineprojectile PROTO_JIBS5 PROJ_DROP -200
defineprojectile PROTO_JIBS5 PROJ_CSTAT 0
defineprojectile PROTO_JIBS5 PROJ_XREPEAT 20
defineprojectile PROTO_JIBS5 PROJ_YREPEAT 20
defineprojectile PROTO_JIBS5 PROJ_HITRADIUS 0
defineprojectile PROTO_JIBS5 PROJ_BSOUND -1
action PROTOJIBS5FRAMES 0 4 1 1 15
useractor notenemy PROTO_JIBS5 0 PROTOJIBS5FRAMES
ifmove 0
{
move STOPPED
sizeat 20 20
ifrnd 128 cstat 0
else cstat 4
cstator 256
strength 0
}
fall
killit
enda
state proto_jibs
{
rand zdist 1024
sub zdist 3500
zshoot zdist PROTO_JIBS5
setactor[RETURN].cstat 4
rand angvar 2047
seta[RETURN].ang angvar
// seta[RETURN].pal 0
}
endsAnyone have an idea to fix this?
#477 Posted 17 April 2020 - 01:03 PM
#478 Posted 17 April 2020 - 02:10 PM
Trooper Dan, on 17 April 2020 - 01:03 PM, said:
Okay, thanks for the info. Finally, I preferred the "EVENT_LOADACTOR" function to simply have clean files and no mess.
Is the solution I found in my penultimate post a good solution? I would like to have a clarification. To avoid any performance problem, I had put the "break" command to avoid that the enemies of the original game (with their skill lotage) could not create problems.
#479 Posted 18 April 2020 - 05:17 PM
The idea is old, easy, and difficult. A proper view weapon mode for third person and multiplayer.
So far "in my head" it goes like this.
1. set up APLAYER mdflag to use event animate sprites for tspr manipulation
2. in event animatesprites addvar picnum (currentweapon * 10000)
3. define the new art to tiles APLAYER + 10,000 = pistol, +20,000 = shotgun...
My questions.
i) Am I missing anything?
ii) Any forseeable sync issues?
iii) Will this be very resource heavy? / How will its performance scale to 8 players?
#480 Posted 18 April 2020 - 05:35 PM
Also, and this is pretty obvious, but there are gaps in the player art with blank tiles and your new tile sets with the other weapons have to include those gaps or the numbers will be wrong.
You might get some hitches when tiles are loaded in, I know I get these already in my mods sometimes when a new enemy spawns into the map. There's a command to preload tiles though.

Help
Duke4.net
DNF #1
Duke 3D #1


