EDuke32 Scripting "CON coding help"
#2478 Posted 06 December 2018 - 02:47 AM
As for the invisible corpse problem, I would define a new move, let's say "move JIBRESPAWN" and then when killed by RPG or RADIUSEXPLOSION, you have the enemies use that move instead of "move TROOPSTOPPED" or whatever that particular actor uses. Then, in the actor's code where the corpse is checking for explosions, add the line "ifmove JIBRESPAWN break" before any of the code that makes them spawn jibs. But also make sure that the "ifrespawn" check happens before the break, otherwise they will be stuck invisible forever. You migth have to move some code around to make it work.
#2479 Posted 06 December 2018 - 04:08 PM
Trooper Dan, on 06 December 2018 - 02:47 AM, said:
Hmm, I can give it a shot and see what happens.
Trooper Dan, on 06 December 2018 - 02:47 AM, said:
This gave me an idea.
state standard_jibs
guts JIBS2 4
guts JIBS3 8
guts JIBS4 12
guts JIBS5 8
guts JIBS6 12
ifrnd 6
{
guts JIBS1 1
spawn BLOODPOOL
} // a badly drawn spine
state jib_sounds
ends
The above is a modified jibs code (love the idea of more jibs when blowing something up) in my external GAME.CON that spawns more guts when blowing monsters up. That being said, what if I can duplicate this code and remove all the parts that spawn jibs and add it to the invisible corpse part as a dummy state for the jibs and then whenever I shoot the invisible corpse, no jibs will spawn. Could that method work instead?
This post has been edited by Mav3r1ck: 06 December 2018 - 04:15 PM
#2480 Posted 06 December 2018 - 05:04 PM
Mav3r1ck, on 06 December 2018 - 04:08 PM, said:
I'm sorry but that broke me. The entire state does nothing but spawn jibs until the very last line which plays sounds.
#2481 Posted 16 December 2018 - 04:36 PM
This post has been edited by Mark: 16 December 2018 - 04:37 PM
#2482 Posted 16 December 2018 - 05:27 PM
#2483 Posted 10 January 2019 - 06:21 AM
EVENT_ANALYZE_SPRITES has no effect in newer version of mapster32.
In the old version (Mapster32 2.0.0devel r4488 (32-bit) Compiled May 28 2014 15:48:34) this method works correctly. In the version (Mapster32 r6332 Built Jul 6 2017 07:49:55, GCC 6.3.0, 32-bit) and later it does not work.
code for exemple:
onevent EVENT_ANALYZESPRITES
for i drawnsprites {
// set any property of tsprite[] has no effect :-(
set tsprite[i].shade -64
}
endevent
This post has been edited by Mr. Alias Nameless: 10 January 2019 - 06:22 AM
#2484 Posted 10 January 2019 - 06:47 AM
Trooper Dan, on 16 December 2018 - 05:27 PM, said:
I forgot to post here that I was able to figure it out with your suggestion. Thanks.
#2485 Posted 12 January 2019 - 12:20 PM
Compiling: GAME.CON (161162 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45661 bytes)
Including: g.def (38 bytes)
g.def: At top level:
g.def:1: error: parameter `{' is undefined.
g.def:1: error: found more `}' than `{'.
GAME.CON: In state `setwinner':
GAME.CON:69: error: found more `}' than `{'.
g.def only contains "music { id "E1L1" file "grabbag.ogg" }".
- Or, I really just want to play the grabbag theme when a player wins a multiplayer game. If I play the theme in the APLAYER actor code you can hear it multiple times from the different players on the map...
This post has been edited by thisbecasper: 12 January 2019 - 12:39 PM
#2486 Posted 12 January 2019 - 02:56 PM
#2487 Posted 12 January 2019 - 03:23 PM
Mark, on 12 January 2019 - 02:56 PM, said:
Yup, thanks, that made it possible to play another song at Holly. Although this doesn't work
music 1 stalker.mid GRABBAG.mid streets.mid watrwld1.mid snake1.mid
thecall.mid ahgeez.mid GRABBAG.mid streets.mid watrwld1.mid snake1.mid
even though this worked
music 1 GRABBAG.mid dethtoll.mid streets.mid watrwld1.mid snake1.mid
thecall.mid ahgeez.mid dethtoll.mid streets.mid watrwld1.mid snake1.mid
and that has always been my problem. I can't play other music than dethtoll on usermaps...
#2488 Posted 12 January 2019 - 05:47 PM
#2489 Posted 12 January 2019 - 05:55 PM
thisbecasper, on 12 January 2019 - 05:47 PM, said:
I don't know and probably won't be able to help. However, if you post the code you are using to change those values, maybe I will have a helpful suggestion. I'm assuming you are talking about changes to those values caused by your own code and not changes in the vanilla game.
#2490 Posted 12 January 2019 - 06:13 PM
Trooper Dan, on 12 January 2019 - 05:55 PM, said:
Thank you very much for your interest. I'm at a point where I'm conviced my code is bug-less
So, the idea of this MP gamemode is simple: First to 30 wins. For every kill you are behind the leader, you get 5 bonus max hp:
state regulatemaxhealth getplayer[THISACTOR].frag tempone getplayer[THISACTOR].fraggedself temptwo subvarvar tempone temptwo //actual amount of kills setvarvar tempthree maxscore //maxscore is leading player's score and is working correctly subvarvar tempthree tempone //Difference between your score and the leader's mulvar tempthree 5 addvar tempthree 100 setplayer[THISACTOR].max_player_health tempthree // It's actually not this line that causes the desync ends
If I kill my opponent, he lies dead on the ground and has now 0/105 hp. When he respawns he gets 105/105 and we have a desync. If I suicide and has yet to spawn I'm on 0/105. However, when I respawn there's no desync. So I have to be killed by an opponent, before the desync happens on a respawn (and it happens every time).
I have no code in EVENT_RESETPLAYER or anything alike. Neither do I have code on killing blows, respawns or anything like that. If I remove the last line in the above state, I get no desync, but then I lose the main part of the mod.
This post has been edited by thisbecasper: 12 January 2019 - 06:32 PM
#2491 Posted 13 January 2019 - 02:18 AM
#2492 Posted 13 January 2019 - 02:28 AM
thisbecasper, on 13 January 2019 - 02:18 AM, said:
Yeah, display events are frame rate dependent and nothing that needs to be synced should ever be handled in them.
#2493 Posted 13 January 2019 - 05:37 PM
However Duke 3D carelessly handle a few animations based on frame rate updates, such as a shrunk players fists.
This post has been edited by Fox: 13 January 2019 - 05:37 PM
#2494 Posted 15 January 2019 - 07:51 AM
#2495 Posted 15 January 2019 - 07:55 AM
#2496 Posted 16 January 2019 - 11:54 PM
#2497 Posted 17 January 2019 - 06:21 AM
thisbecasper, on 12 January 2019 - 03:23 PM, said:
music 1 stalker.mid GRABBAG.mid streets.mid watrwld1.mid snake1.mid
thecall.mid ahgeez.mid GRABBAG.mid streets.mid watrwld1.mid snake1.mid
even though this worked
music 1 GRABBAG.mid dethtoll.mid streets.mid watrwld1.mid snake1.mid
thecall.mid ahgeez.mid dethtoll.mid streets.mid watrwld1.mid snake1.mid
and that has always been my problem. I can't play other music than dethtoll on usermaps...
I took a look at what I did for my Graveyard mod.
// Music for title and end
music 0 GAMEOVER.mid BRIEFING.MID
// Music for the individual levels
music 1 graveyardnew.ogg map2.ogg map2.ogg bonus.mid
I was able to choose whatever I wanted. I have no idea why you can't. As a test, try an older eduke32 version from a few months or a year ago.
#2498 Posted 17 January 2019 - 07:14 AM
Mark, on 17 January 2019 - 06:21 AM, said:
// Music for title and end
music 0 GAMEOVER.mid BRIEFING.MID
// Music for the individual levels
music 1 graveyardnew.ogg map2.ogg map2.ogg bonus.mid
Maybe I have to say that I'm not playing a custom episode, but rather on usermaps (so I guess thats E1L8?)
Mark, on 17 January 2019 - 06:21 AM, said:
Good point. I'm using the eduke-oldmp build, but I tried the "normal" eduke and it's the same. The songs change when I replace the filenames with others, like you showed. It still plays dethtoll on usermaps though...
This post has been edited by thisbecasper: 17 January 2019 - 07:14 AM
#2499 Posted 30 January 2019 - 01:26 AM
actor 3747
ifvarvarg sprite[THISACTOR].z 0 {
setactor[THISACTOR].htbposx sprite[THISACTOR].z
setactor[THISACTOR].z -100000
} else
fall
cstator 8192
enda
This post has been edited by Mr. Alias Nameless: 30 January 2019 - 01:26 AM
#2500 Posted 30 January 2019 - 02:06 AM
This post has been edited by Fox: 30 January 2019 - 02:06 AM
#2501 Posted 30 January 2019 - 02:43 AM
#2502 Posted 30 January 2019 - 06:07 AM
#2503 Posted 30 January 2019 - 11:19 AM
Mark, on 30 January 2019 - 06:07 AM, said:
It's not really "adjustable". What both Fox and I are saying is you can simply not have the command be executed every single game tic.
#2504 Posted 30 January 2019 - 11:41 AM
#2505 Posted 31 January 2019 - 06:21 AM
Firefly_Trooper, on 30 January 2019 - 11:41 AM, said:
Finally it will not be worth it, because I have a new unexpected problem that pisses me off
The code is posted on my thread.
This post has been edited by Firefly_Trooper: 31 January 2019 - 06:22 AM
#2506 Posted 31 January 2019 - 08:23 PM
" onevent EVENT_FIRE set RETURN -1 break
That will prevent weapon firing but quick kick is a separate function."
How would I use that so its active only while the player is in a "lockplayer" mode during a conversation with an enemy?
If it helps any, there are quotes on the top of the screen and sound clips playing during this time.
This post has been edited by Mark: 31 January 2019 - 08:30 PM
#2507 Posted 01 February 2019 - 12:25 AM
Mark, on 31 January 2019 - 08:23 PM, said:
If it helps any, there are quotes on the top of the screen and sound clips playing during this time.
For that context it would be better to use setp[].weapon_pos -9
That will force the weapon down to the bottom of the screen like you were switching weapons and not allow the player to fire. As soon as you stop setting it to -9, it will smoothly come back up.
Now let's say that quotes 150 to 155 are used for the conversation (just picking numbers at random), and are not used for other purposes. Then the following code would work in the APLAYER actor:
ifg player[].fta 0 ifge player[].ftq 150 ifle player[].ftq 155 setp[].weapon_pos -9
But it would be better to do it in the same block of code that is locking the player.

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


