Duke4.net Forums: EDuke32 Scripting - Duke4.net Forums

Jump to content

  • 117 Pages +
  • « First
  • 37
  • 38
  • 39
  • 40
  • 41
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Plagman 

  • Former VP of Media Operations

#1141

I think you'd need to disable it and add your own SE that tracks the player.
1

User is offline   Diaz 

#1142

Oh, nevermind, I just did it. WEAPON6_FLASHCOLOR was the var I wanted. Sorry and thanks :P

This post has been edited by Diaz: 27 February 2013 - 01:31 PM

0

User is offline   Diaz 

#1143

I'm getting a strange problem with hitradius, that has probably been there for ages, even before EDuke.

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?
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#1144

I would have suspected this was because the actor was in it's "sleeping" state and therefore wouldn't run it's "ifhitweapon bla bla code" but then that wouldn't quite explain the direct impact killing it.
But I say the problem definitely is in the "sleeping" part as you have said.
0

User is offline   zazo 

#1145

how to reactivate the shadows of sprites (spriteshadow) in polymer mod ?
0

User is offline   Danukem 

  • Duke Plus Developer

#1146

So here's my problem. For my Attrition mod, I need to define hundreds of levels, so that a large number of maps is available in the game (which are accessed via the startlevel command, not by normal level progression). But this means I have to define more episodes than I want, and those episodes appear in the episode selection screen. Currently I have 'random missions 1', 'random missions 2', and 'random missions 3' which makes the selection screen very messy.

How can I get around this problem?
0

#1147

View PostTrooper Dan, on 13 March 2013 - 07:45 PM, said:

So here's my problem. For my Attrition mod, I need to define hundreds of levels, so that a large number of maps is available in the game (which are accessed via the startlevel command, not by normal level progression). But this means I have to define more episodes than I want, and those episodes appear in the episode selection screen. Currently I have 'random missions 1', 'random missions 2', and 'random missions 3' which makes the selection screen very messy.

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.
0

User is offline   Danukem 

  • Duke Plus Developer

#1148

View PostDr. Kylstein, on 13 March 2013 - 09:47 PM, said:

Have you considered just skipping the menu?


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

1

User is offline   Danukem 

  • Duke Plus Developer

#1149

OK here's one that should be easy but I don't see a way to do it. How can I make it NOT show the cutscene if the player selects episode 4?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1150

Yeah, Eduke should allow you to define flags for episodes or levels. The options could be "Display cutscene #", "Hide from episode selection" and "Unavaiable (Shareware) episode".
1

User is offline   Helixhorned 

  • EDuke32 Developer

#1151

View PostTrooper Dan, on 14 March 2013 - 12:08 AM, said:

OK here's one that should be easy but I don't see a way to do it. How can I make it NOT show the cutscene if the player selects episode 4?

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.
0

User is offline   Danukem 

  • Duke Plus Developer

#1152

View PostHelixhorned, on 15 March 2013 - 09:00 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.


Thanks!!
0

User is offline   Danukem 

  • Duke Plus Developer

#1153

Just one problem:

I get this error when i try to set LOGO_FLAGS:

Quote

attrition/attcons/ATTHUD.CON:154: error: symbol `LOGO_FLAGS' is not a game variable.


Even though the wiki says it is a gamevar.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1154

I use it with the gamevar command.
0

User is offline   Danukem 

  • Duke Plus Developer

#1155

View PostFox, on 15 March 2013 - 10:42 AM, said:

I use it with the gamevar command.


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.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#1156

Define it as global gamevar instead, which it is conceptually anyway. LOGO_FLAGS is one of three peculiar gamevars that do not exist predefined from CON, but which are referenced from the game code. By the way, it helps to look at the log for troubleshooting: for me it says

Quote

Line 0, definelevelname: Gv_GetVar(): invalid sprite/player ID -1/-1

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.
0

User is offline   Danukem 

  • Duke Plus Developer

#1157

View PostHelixhorned, on 15 March 2013 - 12:51 PM, said:

Define it as global gamevar instead, which it is conceptually anyway. LOGO_FLAGS is one of three peculiar gamevars that do not exist predefined from CON, but which are referenced from the game code. By the way, it helps to look at the log for troubleshooting: for me it says

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.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1158

I suppose that during some instances of the game, such as while checking if it should display the Shareware or Ten screens, the player doesn't exist, not even as a placeholder, so it fails to make the check if LOGO_FLAGS is a per-player variable.

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

0

User is offline   Helixhorned 

  • EDuke32 Developer

#1159

View PostTrooper Dan, on 15 March 2013 - 01:07 PM, said:

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.

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.

View PostFox, on 15 March 2013 - 01:32 PM, said:

I suppose that during some instances of the game, such as while checking if it should display the Shareware or Ten screens, the player doesn't exist, not even as a placeholder, so it fails to make the check if LOGO_FLAGS is a per-player variable.

What exactly LOGO_FLAG_STOPANIMSOUNDS does? I tested it, but I couldn't figure it out.

Hendricks266, in r3545, said:

Make stopping of all sounds after completion of LOGO.ANM conditional on the newly introduced (LOGO_FLAGS & LOGO_STOPANIMSOUNDS). Modifies r3217.

0

User is offline   Diaz 

#1160

I'm not sure if I have asked this before, but are stayput actors hard-coded to have more strength? One of my stayput enemies (which replaces the PigCop) takes two rockets to die, while the non-stayput version takes just one.
0

User is offline   Micky C 

  • Honored Donor

#1161

Did you by any chance define your stay put enemies by having an alternate pal? Recently eduke32 was changed so that enemies with alternate pals have double strength (although I would hope this doesn't apply to mods).
0

User is online   Jblade 

#1162

View PostTrooper Mick, on 20 March 2013 - 02:08 PM, said:

Did you by any chance define your stay put enemies by having an alternate pal? Recently eduke32 was changed so that enemies with alternate pals have double strength (although I would hope this doesn't apply to mods).

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)
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1163

I don't agree with that decision. That was just an ugly hack to increase the hit points of the Assault Captain, which accidentally extended to other enemies (and was fixed in Atomic Edition).

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.

View PostJames, on 20 March 2013 - 02:15 PM, said:

For them to add it back in must mean it was supposed to still happen in Atomic edition

Not really, in Atomic Edition the Assault Captain hit points is changed via CON, and nothing was changed about the other actors.

View PostJames, on 20 March 2013 - 02:15 PM, said:

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

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

0

User is online   Jblade 

#1164

View PostFox, on 20 March 2013 - 02:16 PM, said:

I don't agree with that decision. That was just an ugly hack to increase the hit points of the Assault Captain, which accidentally extended to other enemies (and was fixed in Atomic Edition).

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?
0

User is offline   Diaz 

#1165

My stayput enemy doesn't have a different palette, just different tilenum (what would be PIGCOPSTAYPUT).
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1166

View PostJames, on 20 March 2013 - 02:19 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?

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.
0

User is online   Jblade 

#1167

View PostFox, on 21 March 2013 - 11:49 AM, 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.

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.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1168

What if someone added a palette to an enemy and didn't wanted it to have double strength...? Probably most of the mappers were not aware of this behavior.

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

0

User is offline   Danukem 

  • Duke Plus Developer

#1169

View PostFox, on 21 March 2013 - 12:35 PM, said:

What if someone added a palette to an enemy and didn't wanted it to have double strength...?


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.
1

User is online   Jblade 

#1170

View PostFox, on 21 March 2013 - 12:35 PM, said:

What if someone added a palette to an enemy and didn't wanted it to have double strength...? Probably most of the mappers were not aware of this behavior.

It's incredibly obvious when a pigcop takes 4 shots instead of 2 from a shotgun.

Quote

And it wouldn't work if you played with the Atomic Edition executable, for example. So it was something that 3DRealms fixed.

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.
1

Share this topic:


  • 117 Pages +
  • « First
  • 37
  • 38
  • 39
  • 40
  • 41
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options