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

Jump to content

  • 119 Pages +
  • « First
  • 42
  • 43
  • 44
  • 45
  • 46
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1291

By the way, is it possible to explain the purpose of the other flags? I know what 0, 1 and 2 are for but the Wikia is not very clear about the meaning of the others.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#1292

View PostFox, on 24 May 2013 - 11:50 AM, said:

By the way, is it possible to explain the purpose of the other flags? I know what 0, 1 and 2 are for but the Wikia is not very clear about the meaning of the others.

They're not part of the official API and thus off-limits to users. LunaCON will disallow setting them unless we specify the meaning of each one clearly and unambiguously. No more guessing and half-baked workarounds!

[Edit: it's not my intent to criticize anyone's work, but I hope it's clear that exposing functionality that is not 100% understood is just a dead end.]
0

User is offline   zazo 

#1293

is a command exist to make a zoom of the screen (usable for a sniper weapon for example)...
another command to set a "hit radius" for a melee weapon ? the defineprojectile xxx PROJ_RANGE seems to set the depth but not a radius around the player...
0

User is offline   LAW 

#1294

setactor[THISACTOR].xrepeat X
setactor[THISACTOR].yrepeat Y


I have used this within eventloadactor and it does nothing. Including these strings with ifactor inside EVENT_GAME also does nothing. The only thing which have worked is old style sizeat at the beginning of the actor code, but it resizes the actor upon seeing the player, which is bad. What am I doing wrong? :/
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1295

First of all, you have actually set the gamevars X or Y to an actual value, right? Because you have posted a small fragment of code.

View Postzazo, on 30 May 2013 - 02:30 AM, said:

is a command exist to make a zoom of the screen (usable for a sniper weapon for example)...
another command to set a "hit radius" for a melee weapon ? the defineprojectile xxx PROJ_RANGE seems to set the depth but not a radius around the player...

Making an explosive hitscan would require more work.

This post has been edited by Fox: 31 May 2013 - 12:10 AM

0

User is online   Danukem 

  • Duke Plus Developer

#1296

View PostFox, on 31 May 2013 - 12:09 AM, said:

Making an explosive hitscan would require more work.


Not too much, though. You could set PROJ_SPAWNS to an actor that explodes with whatever hitradius you want.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1297

That wouldn't work very well. The PROJ_SPAWNS seems to be flawed, besides half of the time it spawns inside of walls canceling the radius explosion. Also it would not return the ownership of the actor firing the hitscan, thus multiplayer score would not work.
0

User is offline   LAW 

#1298

View PostFox, on 31 May 2013 - 12:09 AM, said:

First of all, you have actually set the gamevars X or Y to an actual value, right? Because you have posted a small fragment of code.


Of course, I am not that stupid :lol: Anyway the whole thing looked like this:

eventloadactor MOSQUITO
setactor[THISACTOR].xrepeat 10
setactor[THISACTOR].yrepeat 10
enda


Why it doesn't work? WHYYYY? :lol:

Maybe it's because in erampage, but it should work...
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1299

Is MOSQUITO a hard-coded actor?
0

User is offline   LAW 

#1300

View PostFox, on 31 May 2013 - 10:36 AM, said:

Is MOSQUITO a hard-coded actor?


Hard-coded or not, why is it resized freely by "sizeat", but not by the code from above?

This post has been edited by LAW: 31 May 2013 - 10:57 AM

0

User is offline   Diaz 

#1301

If it's hard-coded, the hard-coded stuff happens after eventloadactor, so it's being reset to the hard-coded size
0

User is offline   LAW 

#1302

Dam. Thanks though.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1303

View PostLAW, on 31 May 2013 - 10:56 AM, said:

Hard-coded or not, why is it resized freely by "sizeat", but not by the code from above?

It shouldn't.
0

User is offline   blizzart 

#1304

View Postzazo, on 30 May 2013 - 02:30 AM, said:

is a command exist to make a zoom of the screen (usable for a sniper weapon for example)...
another command to set a "hit radius" for a melee weapon ? the defineprojectile xxx PROJ_RANGE seems to set the depth but not a radius around the player...


That´s something I´m also interested in.
0

User is offline   zazo 

#1305

View PostTrooper Dan, on 31 May 2013 - 09:18 AM, said:

Not too much, though. You could set PROJ_SPAWNS to an actor that explodes with whatever hitradius you want.


Yes, but it muste be a hitradius that not hurt the player, only enemy. And a "knee" weapon style, not explosion ...
0

User is offline   LAW 

#1306

As we know in Duke Nukem, RESPAWN "passes" its pal to the spawned sprite. The same thing happened in the original Redneck.

I have an enemy, which does a few things upon dying when spritepal 30, 31 or 32. It works, when that enemy is put on the ground in Build. However, when it is spawned by a RESPAWN it does nothing and judging from its spritepal dependant behaviour it has pal 0. I've come with an idea to put the foe on the conveyor belt, where it could be moved into the silent teleport. But somehow it doesn't bother the conveyor belt's motion and it doesn't fall into the teleport's chasm even though it has 'fall' command in its code. Changing 'actor' to useractor enemy' also doesn't change things.

I've tried to code it out in EVENT_GAME. Maybe my logic is wrong, but I will show, what was done:

gamevar OWNER 0 0
gamevar PAL 0 0

ifactor MAMA
getactor[THISACTOR].owner OWNER
ifvare OWNER RESPAWN getactor[OWNER].pal PAL
setactor[THISACTOR].pal PAL //OR ifvare PAL 30 spritepal 30


It doesn't work. Is there a workaround to have that enemy appear on demand and do the special actions?

This post has been edited by LAW: 08 June 2013 - 05:20 AM

0

User is offline   XThX2 

#1307

I think there was a thing with Duke's enemies that they had to "see" you first for their code to run, or something like that. IIRC fall is one of those. (I can remember the Enforcer's on episode 2 falling after they see you, in the first level.)

This post has been edited by XThX2: 08 June 2013 - 06:26 AM

0

User is offline   Daedolon 

  • Ancient Blood God

#1308

It's not true only for enemies, but any actor, including all the FEM actors.
0

User is offline   LAW 

#1309

But I have put a NEWBEAST clone in my Fury161r map and it was transported by a conveyor belt even though it hasn't seen the player...
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1310

View PostLAW, on 08 June 2013 - 05:20 AM, said:

As we know in Duke Nukem, RESPAWN "passes" its pal to the spawned sprite.

Not really, in the bosses case it has been hard-coded to work that way. Surprisingly the Assault Tropper has been forgotten, as a result it fails to respawn Captains instead.

This post has been edited by Fox: 08 June 2013 - 08:02 AM

0

User is offline   LAW 

#1311

So do you have any idea what I could do, except of just putting the enemy on the ground?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1312

View PostLAW, on 08 June 2013 - 05:20 AM, said:

I've tried to code it out in EVENT_GAME. Maybe my logic is wrong, but I will show, what was done:

gamevar OWNER 0 0
gamevar PAL 0 0

ifactor MAMA
getactor[THISACTOR].owner OWNER
ifvare OWNER RESPAWN getactor[OWNER].pal PAL
setactor[THISACTOR].pal PAL //OR ifvare PAL 30 spritepal 30


It doesn't work. Is there a workaround to have that enemy appear on demand and do the special actions?

There are some problems with your code. First of all the .owner may be reseted after EVENT_EGS, so you should save it to a gamevar before.

Also shouldn't the code after "ifactor MAMA" be inside of brackets? Without it the code would attempt to change the pal of all sprites, including the RESPAWN ones.

View PostLAW, on 08 June 2013 - 08:00 AM, said:

So do you have any idea what I could do, except of just putting the enemy on the ground?

I think it doesn't apply here since EVENT_GAME runs regardless of the actor being seen yet by player or not.

This post has been edited by Fox: 08 June 2013 - 08:03 AM

1

User is offline   LAW 

#1313

View PostFox, on 08 June 2013 - 08:02 AM, said:

EVENT_EGS


Uh, oh I have forgot about this event - it has soooo unimpressive name :lol:

So now everything works like a charm. Thanks Fox. I am a foxy gentleman and I like foxes :lol:
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1314

EGS = Enter Game Spawn/State?
0

User is offline   zazo 

#1315

I wonder if there are some improvements on the water effects for eduke: water distortion, water reflection, waves... ? something more realistic
0

User is offline   Plagman 

  • Former VP of Media Operations

#1316

The current mirror code can combine with parallax mapping to do an OK water effect, but it's definitely not ideal; having a real water effect is something I'm planning to do at some point.

Posted Image
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1317

Won't that work only with ROR?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #1318

Not necessarily, you would just need to set up a view portal with Polymer.
0

User is offline   zazo 

#1319

very great,
view portal ? miror code for floor ???
have some code or mapster keys for this ?? :lol: :lol:
0

User is offline   Hendricks266 

  • Weaponized Autism

  #1320

There is currently no way to give Polymer the information. Same with the screenshot of E1L1 windows reflecting.
0

Share this topic:


  • 119 Pages +
  • « First
  • 42
  • 43
  • 44
  • 45
  • 46
  • 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