EDuke32 Scripting "CON coding help"
#1141 Posted 27 February 2013 - 01:24 PM
#1142 Posted 27 February 2013 - 01:31 PM
This post has been edited by Diaz: 27 February 2013 - 01:31 PM
#1143 Posted 02 March 2013 - 12:50 AM
I have a weapon that creates a quite big hitradius of 8000 60 100 400 550.
If an enemy with, let's say, 100 health points hasn't been "activated" (i.e. the player has not seen it) and this hitradius hits near it, it won't be killed, but damaged (sometimes not by much) instead; if the projectile hits him dead-on it will be killed. If the enemy is "activated" and is at the same distance as in the first previous case, it will be killed, which is what should happen.
Anyone knows why the hitradius effectiveness seems to decrease if enemies haven't become active?
#1144 Posted 03 March 2013 - 08:15 AM
But I say the problem definitely is in the "sleeping" part as you have said.
#1145 Posted 05 March 2013 - 05:24 AM
#1146 Posted 13 March 2013 - 07:45 PM
How can I get around this problem?
#1147 Posted 13 March 2013 - 09:47 PM
Trooper Dan, on 13 March 2013 - 07:45 PM, said:
How can I get around this problem?
Have you considered just skipping the menu?
onevent EVENT_CHANGEMENU ifvare RETURN 100 { ifvare current_menu 110 { //don't know how to tell if the player is in a game in order to //choose between these appropriately. setvar RETURN 0 //title menu //setvar RETURN 50 //in-game menu } else setvar RETURN 110 } endevent
It doesn't always backtrack to the right menu, and it doesn't define what level you go to (goes to E1L1 from a freshly launched game), but it's a start.
#1148 Posted 13 March 2013 - 10:45 PM
Dr. Kylstein, on 13 March 2013 - 09:47 PM, said:
That's a potentially useful event that I didn't know about, so thanks for the suggestion. However, let's just say for now that I would prefer to have control over the regular episode display. I would like to define levels without having an episode for them, or at least not having the episode show up or be selectable in the episode select screen. Skipping the menu and having a special map immediately get launched with a CON coded menu is a possible solution but it would be far more work than I want to do.
I'm pretty sure there's a simple trick for this -- I seem to remember there being one that has been around since the dawn of time.
EDIT: It looks like I might be able to achieve the desired effect by the simple expedient of defining levels for undefined episodes. For example:
definelevelname 4 0 E1L1.map 01:45 00:53 HOLLYWOOD HOLOCAUST
when episode 4 has not been defined. But I don't know whether the level definition will actually count in that case. EDIT2: It does. So problem solved, I guess.
This post has been edited by Trooper Dan: 13 March 2013 - 11:56 PM
#1149 Posted 14 March 2013 - 12:08 AM
#1150 Posted 14 March 2013 - 01:53 AM
#1151 Posted 15 March 2013 - 09:00 AM
Trooper Dan, on 14 March 2013 - 12:08 AM, said:
Revision 3566 adds a new LOGO_FLAGS bit, 2048, to prevent that cutscene. I agree with Fox that a more convenient or general interface would be preferable though.
#1152 Posted 15 March 2013 - 09:23 AM
Helixhorned, on 15 March 2013 - 09:00 AM, said:
Thanks!!
#1153 Posted 15 March 2013 - 10:39 AM
I get this error when i try to set LOGO_FLAGS:
Quote
Even though the wiki says it is a gamevar.
#1155 Posted 15 March 2013 - 11:44 AM
Fox, on 15 March 2013 - 10:42 AM, said:
ah, I see. But there's still an issue. When I use:
gamevar LOGO_FLAGS 2303 1
255+2048 ... It nixes the cutscene but I also get the shareware screens and the tenscreen when quitting the game, which should not happen unless the flags for 256 and 512 are set.
#1156 Posted 15 March 2013 - 12:51 PM
Quote
The strange line number and wrong command are because Gv_GetVar() isn't called from CON code, so there's nowhere to get this debug information from.
#1157 Posted 15 March 2013 - 01:07 PM
Helixhorned, on 15 March 2013 - 12:51 PM, said:
The strange line number and wrong command are because Gv_GetVar() isn't called from CON code, so there's nowhere to get this debug information from.
Uh yeah, I should have checked the log, it works now. Since the per-player gamevar declaration was partially working, I didn't consider the possibility that it was invalid.
#1158 Posted 15 March 2013 - 01:32 PM
What exactly LOGO_FLAG_STOPANIMSOUNDS does? I tested it, but I couldn't figure it out.
This post has been edited by Fox: 15 March 2013 - 01:34 PM
#1159 Posted 16 March 2013 - 05:20 AM
Trooper Dan, on 15 March 2013 - 01:07 PM, said:
What was probably happening is that the Gv_GetVar() call returned -1, which is often used as a "error condition" marker in C code and that value got interpreted as the logo flags. Of course, -1 has all bits set...
The broader issue though is that the CON parser/interpreter permits a lot of sloppiness on the user side when it should give decent error messages or warn instead. This case is rather benign.
Fox, on 15 March 2013 - 01:32 PM, said:
What exactly LOGO_FLAG_STOPANIMSOUNDS does? I tested it, but I couldn't figure it out.
Hendricks266, in r3545, said:
#1160 Posted 20 March 2013 - 01:57 PM
#1161 Posted 20 March 2013 - 02:08 PM
#1162 Posted 20 March 2013 - 02:15 PM
Trooper Mick, on 20 March 2013 - 02:08 PM, said:
It does - I remember I brought up some time ago that pigcops with a different pal had twice as much health in v1.3D, somebody confirmed it and then it was added back into Eduke32. For them to add it back in must mean it was supposed to still happen in Atomic edition but was broke for some reason since I know they normally shy away from gameplay effecting bugs (Like for instance, not fixing the fact that respawns don't respect pal colour, since there's several Liztroop respawns ingame that are supposed to spawn captains)
#1163 Posted 20 March 2013 - 02:16 PM
If anything, Eduke32 should apply this behavior only to version 1.3. I suppose a safe way to get the game version is to check the number of gamestartup entries in user.con.
James, on 20 March 2013 - 02:15 PM, said:
Not really, in Atomic Edition the Assault Captain hit points is changed via CON, and nothing was changed about the other actors.
James, on 20 March 2013 - 02:15 PM, said:
They are not supposed to. It is just in some specific cases which the source makes some actors take the respawn pal (Boss1 for example), but they forget to give it to the Liztroop.
This post has been edited by Fox: 20 March 2013 - 02:22 PM
#1164 Posted 20 March 2013 - 02:19 PM
Fox, on 20 March 2013 - 02:16 PM, said:
It was hard-coded? Well bug or not, I think that V1.3D maps should have the strength change respected, but is it worth coding in a way to check if a map's v1.3D or not?
#1165 Posted 21 March 2013 - 10:12 AM
#1166 Posted 21 March 2013 - 11:49 AM
James, on 20 March 2013 - 02:19 PM, said:
Do it matters whenever it is a 1.3d map or not? Eduke32 is based on Atomic Edition version. It is not like Eduke32 is making a gameplay change, it is something that 3DRealms already did on their own.
#1167 Posted 21 March 2013 - 12:11 PM
Fox, on 21 March 2013 - 11:49 AM, said:
If someone makes a map for 1.3D that uses a bug to change it's gameplay, and then a new version of the game fixes that bug so it messes up the gameplay of earlier user levels, having an option to re-enable that bug so that the map can be played as the author intended is only fair.
#1168 Posted 21 March 2013 - 12:35 PM
And it wouldn't work if you played with the Atomic Edition executable, for example. So it was something that 3DRealms fixed.
This post has been edited by Fox: 21 March 2013 - 12:37 PM
#1169 Posted 21 March 2013 - 12:39 PM
Fox, on 21 March 2013 - 12:35 PM, said:
Then the map will be harder than intended. There are many user maps released for Atomic over the years with paletted enemies where this could be an issue.
#1170 Posted 21 March 2013 - 01:01 PM
Fox, on 21 March 2013 - 12:35 PM, said:
It's incredibly obvious when a pigcop takes 4 shots instead of 2 from a shotgun.
Quote
You still don't understand. Wherether they fixed it in atomic or not doesn't matter, since the behaviour existed in v1.3D and that's what some people mapped for.
There's no real point in this discussion regardless, I think it should be a compatability option but the number of atomic maps outnumber 1.3D maps so it would be best to remove the feature if a toggle isn't added.