
EDuke32 Scripting "CON coding help"
#1097 Posted 09 January 2013 - 05:21 PM
#1098 Posted 10 January 2013 - 06:10 AM
very annoying to work on dark places in a map.
some configurations to fix that ? thanks
#1099 Posted 10 January 2013 - 06:19 AM
Mblackwell, on 09 January 2013 - 05:21 PM, said:
Not that i'm aware of. At least, i'm not fiddling with the sprites xvel. They start out stationary/stacked, so.... Blah. I tried adding clipdist to the code, and it made no discernable difference.
I did make a clipshape for the block, but I don't see why that would be the problem, since some of the blocks do end up stacking properly and others just fall through... Ugh...
Here's the code:
define BLOKBREK 19 action BLOKSTAY 0 action BLOKBREKNO 0 useractor notenemy BLOKBREK clipdist 84 fall ifaction BLOKBREKNO { ifactioncount 16 { strength 0 action BLOKSTAY break } } else ifhitweapon { ifwasweapon RADIUSEXPLOSION { debris SCRAP1 8 debris SCRAP2 4 debris SCRAP3 7 killit } else action BLOKBREKNO } enda
Here's what the stack looks like in Mapster.

Here's what it looks like in game.

...The heck? To my knowledge they're all identical.
Now, over the edge of the platform I am on, they go all the way down to the bottom floor. So it's not something that stupid. I started with it at ground level, and made the raised platform to be able to see the top of the stack.
#1100 Posted 10 January 2013 - 12:25 PM
Commando Nukem, on 09 January 2013 - 10:48 AM, said:
I've got this code. It works just fine. Basically its just boxes. I'm stacking boxes.
Now, for no apparent reason, some of the boxes just decide to fall through the other boxes.
If you raise the boxes a little so that they have a gap in between, they stay on each other. Unfortunately, game code is littered with "magic" z displacements everywhere. A suggestion at a workaround is to make the box model (I assume you will be making models since flat boxes are a little nonsensical, right?) bigger than its tile which is used for collision computations.
Commando Nukem, on 10 January 2013 - 06:19 AM, said:
Clipdist is only used for clipmove, that is, horizontal movement. For BUILD, horizontal and vertical movement are two different concepts.
#1101 Posted 10 January 2013 - 12:31 PM
zazo, on 10 January 2013 - 06:10 AM, said:
very annoying to work on dark places in a map.
some configurations to fix that ? thanks
The following cvars are relevant:
- r_usenewshading: selects between three fog computation modes.
- r_shadescale: specifies a factor applied to the shade. This is currently 1.3 by default, so it may darken very dark objects to the point of being black. However, there's
- r_shadescale_unbounded, which prevents objects becoming plain black if set to 0 (the default).
Check that these are the same for the game and editor. They're not synchronized automatically.
#1102 Posted 10 January 2013 - 01:25 PM
Helixhorned, on 10 January 2013 - 12:31 PM, said:
- r_usenewshading: selects between three fog computation modes.
- r_shadescale: specifies a factor applied to the shade. This is currently 1.3 by default, so it may darken very dark objects to the point of being black. However, there's
- r_shadescale_unbounded, which prevents objects becoming plain black if set to 0 (the default).
Check that these are the same for the game and editor. They're not synchronized automatically.
in mapster32.cfg and eduke32.cfg files ???
#1103 Posted 10 January 2013 - 01:31 PM
scray !!!

#1104 Posted 10 January 2013 - 02:25 PM
Helixhorned, on 10 January 2013 - 12:25 PM, said:
If you raise the boxes a little so that they have a gap in between, they stay on each other. Unfortunately, game code is littered with "magic" z displacements everywhere. A suggestion at a workaround is to make the box model (I assume you will be making models since flat boxes are a little nonsensical, right?) bigger than its tile which is used for collision computations.
Clipdist is only used for clipmove, that is, horizontal movement. For BUILD, horizontal and vertical movement are two different concepts.
Ah, man... That's what I figured. Thanks for the info. That kinda blows. Basically what i'm wanting to do is build a minecraftian map. Certain structures would have walls that would be blastable with explosives, so you can build alternate paths through the environment. That means the player would need direct interaction with the objects (jumping over them, etc.)
#1105 Posted 10 January 2013 - 04:31 PM
zazo, on 10 January 2013 - 01:31 PM, said:
scray !!!

in the old days tricks were used, or if you go old enough, mistakes were made, that weren't yet mistakes. A level 4 is vary scray indeed. Using ALT + (either) [ or ] you can cycle through them and see whats up.
#1106 Posted 11 January 2013 - 06:24 AM
Drek, on 10 January 2013 - 04:31 PM, said:
hum... ALT+] or [ doesn't work to see the errors... the console show a list of sprites num (and sec num ) where the problems are. How can i cycle through them to see what is wrong ? how to find a sprite num in mapster ?
And another question: how to configure the mouse speed and acceleration for navigate in the 2d mod in mapster ?
#1107 Posted 11 January 2013 - 07:39 AM
zazo, on 11 January 2013 - 06:24 AM, said:
And another question: how to configure the mouse speed and acceleration for navigate in the 2d mod in mapster ?
ok, the keys works. im not good.
Some 100 lost sprites in the corners of the map that were not in sectors... easy to fix them.
but for sectors (wrap)...what can i do ?
how to configure the mouse speed and acceleration for navigate in the 2d mod in mapster ?
#1108 Posted 11 January 2013 - 08:13 AM
zazo, on 10 January 2013 - 01:25 PM, said:
In the applications' consoles: use the backtick key ([`], the key underneath [Esc]) to open it and then issue the commands.
zazo, on 11 January 2013 - 07:39 AM, said:
Depending on what kind of corruption it is, you'll need to ask the local expert(s) for help

I started a wiki page about corruptions a while ago, but didn't finish it, nor got to putting up a link.
Quote
That's not configurable, but you can "run" by having LShift pressed and "strafe" by holding RCtrl.
edit: actually, there's pk_turndecel and the slightly misnamed pk_turnaccel (which is angular acceleration+deceleration really). Then there's UnrealEd mouse mode in 3D mode (toggled with F5), which can be configured with pk_uedaccel...
#1109 Posted 11 January 2013 - 10:00 AM
zazo, on 11 January 2013 - 07:39 AM, said:
Well you don't really need to navigate in 2d mode if I understand correctly what you mean. Instead you just need to right-click the mouse to move along the map in 2d, and scroll the mouse mid button to zoom-in, zoom-out.
#1110 Posted 13 January 2013 - 07:57 AM
Norvak, on 11 January 2013 - 10:00 AM, said:
thanks !
another question: How to prevent stop sounds in the game when the player accesses the menu?
for example, in game the player encounter a character and starts talking, but if the menu is accessed (load, save, adjust the sound volume), its stop the speech...
#1111 Posted 13 January 2013 - 04:32 PM
#1112 Posted 14 January 2013 - 07:01 AM
RichardStorm, on 13 January 2013 - 04:32 PM, said:
annoying problem with mapster editor: how to get out of the window MAPSTER, or minimize it to switch to other applications such as text editor or image editor ?
it is very difficult to get out of the maspter window by pressing the windows key ...
and it crash ofen at closing
#1113 Posted 14 January 2013 - 07:06 AM
Mapster has crashed at exit for a couple of years now for me, I think I did report it, but I expect the devs were busy and I never cared that much as it only does it when it's already seemingly exited.
#1114 Posted 14 January 2013 - 10:49 AM
High Treason, on 14 January 2013 - 07:06 AM, said:
Does removing/renaming nedmalloc.dll fix it?
#1115 Posted 15 January 2013 - 08:41 AM
apparently there is no crash this time in my side
a list of commands for the mapster console ??
what was so special about using the console?
#1116 Posted 15 January 2013 - 03:59 PM
#1117 Posted 16 January 2013 - 03:30 AM
Mark., on 15 January 2013 - 03:59 PM, said:
how to make a no shade frame in an animation, in order to create a flash effect when the monster shot the player ?
#1118 Posted 16 January 2013 - 05:50 AM
#1119 Posted 16 January 2013 - 06:26 AM
Mblackwell, on 16 January 2013 - 05:50 AM, said:
not for the entire level but for a sprite only, on a specific frame,
#1120 Posted 16 January 2013 - 10:29 AM
Edit. I meant defs.con not def code
This post has been edited by Drek: 16 January 2013 - 06:16 PM
#1121 Posted 16 January 2013 - 03:20 PM
if you have this code somewhere...
#1122 Posted 16 January 2013 - 04:25 PM
zazo, on 16 January 2013 - 03:20 PM, said:
if you have this code somewhere...
The guts of the code for that is in "state slipperycode" in PLAYERPLUS.CON
#1123 Posted 20 January 2013 - 02:01 PM
gamevar that_actor 0 0 gamevar distance 0 0 gamevar tilenum 0 0 gamevar temp 0 0 gamevar temp2 0 0 gamevar xpos 0 0 gamevar ypos 0 0 gamevar zpos 0 0 gamevar xpos2 0 0 gamevar ypos2 0 0 gamevar zpos2 0 0 gamevar angle 0 0 gamevar angle2 0 0 gamevar sectorvar 0 0 gamevar sectorvar2 0 0 gamevar thatactor 0 0 gamevar wallvar 0 0 gamevar shotrange 0 1 state squarethreedistance // (xpos, ypos, zpos, xpos2, ypos2, zpos2) returns square of distance in temp subvarvar xpos xpos2 subvarvar ypos ypos2 subvarvar zpos zpos2 divvar zpos 16 //16384z = 1024xy mulvarvar xpos xpos mulvarvar ypos ypos mulvarvar zpos zpos addvarvar xpos ypos addvarvar xpos zpos setvarvar temp xpos ends state threedistance state squarethreedistance sqrt temp temp ends onevent EVENT_GAME ifactor APLAYER { getplayer[THISACTOR].posx xpos getplayer[THISACTOR].posy ypos getplayer[THISACTOR].posz zpos getplayer[THISACTOR].ang angle getplayer[THISACTOR].cursectnum sectorvar getplayer[THISACTOR].horiz angle2 subvar angle2 100 mulvar angle2 -2048 cos temp angle sin temp2 angle hitscan xpos ypos zpos sectorvar temp temp2 angle2 sectorvar2 wallvar thatactor xpos2 ypos2 zpos2 0xFFFF0030 state threedistance setvarvar shotrange temp } endevent onevent EVENT_GAME ifactor SHOTSPARK1 { getactor[THISACTOR].htg_t 8 that_actor ifvarn that_actor -1 { /*getactor[that_actor].picnum tilenum switch tilenum case LIZTROOPONTOILET: case LIZTROOPSTAYPUT: case LIZTROOPSHOOT: case LIZTROOPJETPACK: case LIZTROOPDUCKING: case LIZTROOPRUNNING: case LIZTROOP: //case OCTABRAIN: //case OCTABRAINSTAYPUT: case COMMANDER: case COMMANDERSTAYPUT: //case EGG: case PIGCOP: case PIGCOPSTAYPUT: case PIGCOPDIVE: case LIZMAN: case LIZMANSTAYPUT: case LIZMANSPITTING: case LIZMANFEEDING: case LIZMANJUMP: //case GREENSLIME: //case ROTATEGUN: case NEWBEAST: //case APLAYER: setvar temp 1 break default: setvar temp 0 break endswitch ifvare temp 1 {*/ dist distance THISACTOR that_actor /*ifvare distance 30 { //state blood_sprinkle } else ifvarl distance 320 { // legshot //state blood_sprinkle getactor[that_actor].htextra temp subvar temp 3 setactor[that_actor].htextra temp } else ifvarl distance 520 { //state blood_sprinkle } else */ifvarl distance 768 ifspawnedby APLAYER ifrnd 64 { // headshot // bloody mess //state blood_sprinkle //state random_wall_jibs //soundonce SQUISHED // damage calc getactor[THISACTOR].owner temp setactor[that_actor].htowner temp getactor[THISACTOR].yvel temp setactor[that_actor].htpicnum temp getactor[that_actor].htextra temp2 /*ifvare temp SHOTGUN { addvarvar temp2 10 } else { addvarvar temp2 60 }*/ //mulvar temp2 4 subvarvar temp2 shotrange ifvarvarl temp2 0 setvar temp2 -1 setactor[that_actor].htextra temp2 addlogvar temp2 } /*}*/ } } endevent
#1124 Posted 22 January 2013 - 03:23 PM
Dr. Kylstein, on 20 January 2013 - 02:01 PM, said:
I am literally just answering this question and not reading your code (to save myself time).
In general, htextra is processed by the actor in its code with the ifhitweapon command. EVENT_GAME occurs after the actor code has been processed, so htextra will have been reset by then and manipulating it will not have the desired effect.
#1126 Posted 22 January 2013 - 06:23 PM
Trooper Dan, on 22 January 2013 - 03:23 PM, said:
Totally understandable. I probably should have removed the commented out part.
Trooper Dan, on 22 January 2013 - 03:23 PM, said:
That does fit my observations. I think perhaps I misinterpreted the locational damage code and that adding to the htextra was done in the off chance that some other damage was stored there rather than the original bullet. Is there any other way to alter the damage for one hitscan shot?