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

Jump to content

  • 124 Pages +
  • « First
  • 50
  • 51
  • 52
  • 53
  • 54
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   lycanox 

#1525

Ok, i got some weird effects while trying out some new parameters for an idea.

I am currently just messing around with creating a crude sunset by cycling skyboxes and changing the visibility.
But each time I try to change a paralaxed sky. It does not work.
Confused I turned off the skybox in mapster. The code does render normally and I can see the tiles change on the now unparralaxed ceiling.

So next I tried turning the paralaxed sky off during the period I change the skybox through code.
But that either does not work. Or reverts the skybox to displaying the brown brick.

I am using the commands

setsector[SECTNUM].ceilingstat (alternating between 1 and 0)
setsector[SECTNUM].ceilingpicnum (just randomly selecting skyboxes or non skyboxed tiles.)

With SECTNUM being the sectornumber of the current actor.

Is this a bug in the code? Or am I approaching this completely wrong? I am using the latest snapshot.

This post has been edited by lycanox: 07 October 2014 - 06:42 AM

0

User is offline   Jblade 

#1526

Try something like this:
// if conditions for changing time are set
{
setvar TEMP 0
whilevarn TEMP NUMSECTORS // this sets up a loop that will go through all the sectors in the current level
 {
 ifvarand sector[TEMP].ceilingstat 1 // if it's a parallex sector
   {
    setsector[TEMP].ceilingpicnum *tilenumber* // change that room's ceiling texture to the number defined here
    setsector[TEMP].visibility 0 // just an example
   }
 addvar TEMP 1 // go up in the loop
 }
}

That should work, although it's untested - making a single sprite do all of the work is better than multiple sprites and you can set up many different ways of configuring the sprite. Once you got it working, we can go from there to add more features + control to it.
0

User is offline   lycanox 

#1527

Hmm, I tried your code and I still get the same effect. I think its an flaw in how the game works through.

I am starting to believe that the paralaxed sky is stored in a different game variable that gets written on map load.
As the game seems to remember the original skybox it was after the map was load.
Starting with skybox 1 and then changing to the picnum of skybox 2 would result in skybox 1 still being displayed.

Curiously this gamevar does only seem to be set on level start. And only seems to be capable of storing one skybox.
So if I were to load a map with no paralaxed sectors and force the code to turn those ceilings into paralaxed skies. It would show tile 0, the brown brick as the sky. If I however play the map after playing a space level. It would show the space skybox from that map. Or the LA one after a city level.

So i probably need a command like "set/getuserdef[TEMP].paralax_picnum"
Which sadly does not exist.

This post has been edited by lycanox: 07 October 2014 - 09:36 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1528

View Postlycanox, on 07 October 2014 - 09:36 AM, said:

I am starting to believe that the paralaxed sky is stored in a different game variable that gets written on map load.
As the game seems to remember the original skybox it was after the map was load.
Starting with skybox 1 and then changing to the picnum of skybox 2 would result in skybox 1 still being displayed.

That's true for Polymer.
0

User is offline   Mblackwell 

  • Evil Overlord

#1529

Only a single skybox is ever loaded in polymer for a given level. I know the limitation of only displaying one at a time, but it's interesting that it can't be swapped.
0

User is offline   Zaxtor 

#1530

Is there such thing as something to "Activate" a gamevar VARNAME x x.
Like we know gamevar VARNAME x x define the var to make the var you add work.

BUT.

Something like a Ifvare blocks the gamevar VARNAME x x until is set.

I wanna do a thing for mainly pre-gamevar set such as weapon stuff etc.

Example if I want an addon to a weapon it set a var so it get to the pre-gamevar and activate them.
like a weapon addon.

Example.
Let say weapon 5 is RPG.
RPG is hard coded and will shoot standard RPG projectile, but hardcoded can be "bypassed" if you add a new WEAPONx SHOOTS thing alongside other pre-gamevars in "http://wiki.eduke32.com/wiki/Pre-defined_gamevars"
Will make the RPG shoot a diff projectile, do diff sound and dmg.

ifvare WEAFIVEADDON 1
                                     {
                                      ??????? WEAPON4_FIRESOUND 666 1
                                      ??????? WEAPON4_SHOOTS 13662 1
                                     }


I've tried gamevar, no working.
I searched but dunno what is the name for the "alternative to gamevar" that acts just like a gamevar but can work if is inside a ifvare thing.
like myospal works inside a ifvare.

Like 666 is to change the RPG sound.
13662 makes it shoot a diff projectile
??????? not sure what type of defining code to put that works inside the ifvare and acts exactly like a gamevar

This post has been edited by Zaxtor: 07 October 2014 - 09:32 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1531

setvar WEAPON4_FIRESOUND 666
setvar WEAPON4_SHOOTS 13662

This post has been edited by Fox: 07 October 2014 - 09:40 PM

0

User is offline   Zaxtor 

#1532

View PostFox, on 07 October 2014 - 09:39 PM, said:

setvar WEAPON4_FIRESOUND 666
setvar WEAPON4_SHOOTS 13662



Doesn't do anything except not causing "not game variable" error without gamevar VARNAME x x error.
I even tried few more , no avail.


PS
It just defines it that's it.

What I wanna do is like an inactive "gamevar WEAPON4_SHOOTS 13662 1"

So that gamevar only works if you set that var blocking it.

This post has been edited by Zaxtor: 07 October 2014 - 10:02 PM

0

User is offline   Jblade 

#1533

You'll need to put the code Fox stated in an actor like the aplayer - it sounds like you want the RPG to shoot a certain projectile if a var is set right? Than do this, put this in the APLAYER actor:
ifvare WEAFIVEADDON 1
     {
    setvar WEAPON4_FIRESOUND 666
    setvar WEAPON4_SHOOTS 13662
     }

0

User is offline   Zaxtor 

#1534

View PostJblade, on 07 October 2014 - 10:05 PM, said:

You'll need to put the code Fox stated in an actor like the aplayer - it sounds like you want the RPG to shoot a certain projectile if a var is set right? Than do this, put this in the APLAYER actor:
ifvare WEAFIVEADDON 1
     {
    setvar WEAPON4_FIRESOUND 666
    setvar WEAPON4_SHOOTS 13662
     }




I put inside the "aplayer" code.

Technically is not RPG I wanna change.
I used RPG as an example to reduce "spoil alerts".

Is technically a non projectile weapon.
projectile works, every thing works.
Is just the code was not.

I tested as "gamevar" and it works.

Now ill put inside the aplayer the setvar so I can make the code "blocked" until u grab the addon.
0

User is offline   Zaxtor 

#1535

Well it "almost works"

When var is set.
Weapon is totally muted. doesn't shoot anything.
Only its animation works.

Is inside the Aplayer actor.
At the beginning below its "title"
Above ifaction 0

This post has been edited by Zaxtor: 07 October 2014 - 10:32 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1536

View PostZaxtor, on 07 October 2014 - 10:27 PM, said:

Is technically a non projectile weapon.

It only works with sprites defined as projectiles. You may wanna set WEAPONX_SPAWN instead.
1

User is offline   Jblade 

#1537

Are you shooting a projectile? You'll have to define a new projectile using the defineprojectile commands.
1

User is offline   Zaxtor 

#1538

View PostJblade, on 07 October 2014 - 10:36 PM, said:

Are you shooting a projectile? You'll have to define a new projectile using the defineprojectile commands.


defineprojectile was the first thing done.
Would be kinda awkward to make something shooting a projectile that isn't defined.


With the WEAPONX_SPAWN.
it works.
All is left is to fix it's "hitting dmg" of the instant hitting projectile since it kinda changed it a bit.

This post has been edited by Zaxtor: 07 October 2014 - 10:43 PM

0

User is online   Danukem 

  • Duke Plus Developer

#1539

View PostFox, on 07 October 2014 - 10:35 PM, said:

It only works with sprites defined as projectiles. You may wanna set WEAPONX_SPAWN instead.


Fox, why did you have to tell him that? Now he has something that he is satisfied with even though it is totally fucked LOL.
1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1540

Any idea on how to make a regular switch activate only once, like a keycard switch?
0

User is online   Hendricks266 

  • Weaponized Autism

  #1541

Make it bring a wall down in front of it.
0

User is offline   Mark 

#1542

Or sink into the floor.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1543

I can't do that. I am just looking for a better way to fix multiplayer-only maps, specifically adding switches on the other side of keycard locked doors. Since you can't use multiplayer-only keycard switches, I must use normal ones.
0

User is offline   Zaxtor 

#1544

I wonder if anyone remember the palfrom that makes the screen flash Xray effect (negative colors) and weird flashes when I think you either give negative values or values above 64.
Is there such things as a way to "Revive" that in the newest Eduke32?

Here is a clip (scenes from Oblivion) using weird palfrom.
Is an older Eduke engine.


Part 1 of the vid (Ghost mothership's core)
Core { palfrom 77 55 95 63 } from being hit, makes this weird red-like flash

Part 2 is more complex, it's multi sprites making the flash.

Part 3 of the vid (evil mask's projectile)
necrotizer "{ palfrom 103 83 74 125 }" for this weird Xray flash like (in older Eduke)
While in modern Eduke just does a bright white flash lasting 2 sec before it starts to decay.
if you put negative value in the intensity rather is -1 or -63 it will make a flash lasting several seconds before it slowly decays.



This post has been edited by Zaxtor: 16 October 2014 - 04:57 PM

1

User is offline   Zaxtor 

#1545

How do we display something "above stat bar" ?

I'm exploring rotate sprite.

Cus when you display something it doesn't go above stat bar.

Rather is with myospal or rotatesprite.
How do we make the object you wanna display go (above) the stat bar?

Like flashes with palfrom goes above stat bar.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1546

Use EVENT_DISPLAYREST.
0

User is offline   Zaxtor 

#1547

View PostFox, on 25 October 2014 - 11:30 PM, said:

Use EVENT_DISPLAYREST.


I'm using it "by default".


The rotate code is.


onevent EVENT_DISPLAYREST
                          setvar DANGEROUSPRESS_01 159
                           setvar DANGEROUSPRESS_02 99
                           setvar DANGEROUSPRESS_03 65536
// setvar ang 0
// setvar tilenum 14080
// setvar shade 0
// setvar pal 0
// setvar orientation 0

rotatesprite DANGEROUSPRESS_01 DANGEROUSPRESS_02 DANGEROUSPRESS_03 0 14080 0 0 0 windowx1 windowy1 windowx2 windowy2

endevent


I barred "//" these others since they have no usage

This post has been edited by Zaxtor: 25 October 2014 - 11:47 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1548

Use
0 0 xdim ydim

Instead of
windowx1 windowy1 windowx2 windowy2


You are not drawing below the HUD, but rather within the area of the player view.
1

User is offline   Zaxtor 

#1549

View PostFox, on 26 October 2014 - 12:52 AM, said:

Use
0 0 xdim ydim

Instead of
windowx1 windowy1 windowx2 windowy2


You are not drawing below the HUD, but rather within the area of the player view.


it works.. thx.
0

#1550

I am working on something pretty basic right now and need some help. I haven't done any Con scripting for about 6 years so I'm quite rusty.

I need an item to give player invincibility and a "1 hit kill" type of power for about 30 Seconds once picked up.

Any help?
0

User is online   Hendricks266 

  • Weaponized Autism

  #1551

I would start by copying the code for the pickup actors like SHOTGUNSPRITE. Replace the addweapon/addammo/addinventory/addphealth command with setting a per-player gamevar to the number of seconds you want the effect to last, times 30. (30 seconds = 900)

From the APLAYER actor, you'll need to add a two-liner that subtracts one from the gamevar if it is greater than zero. This will set up the structure of the effect, but it won't do anything yet.

Invincibility would probably best be achieved by getting the player's health when the item is acquired and setting the player's health to that value every tic while the item is active.

One hit kills would be more complicated. I would suggest adding code to EVENT_GAME that checks if the current sprite's htowner is equal to the player in question's .i value. If it is, it sets the sprite's htextra to 32767 (the highest value).

Post again if you need more help executing these suggestions.
0

User is offline   Zaxtor 

#1552

 chuck bronson, on 09 November 2014 - 07:07 PM, said:

I am working on something pretty basic right now and need some help. I haven't done any Con scripting for about 6 years so I'm quite rusty.

I need an item to give player invincibility and a "1 hit kill" type of power for about 30 Seconds once picked up.

Any help?



Maybe doing cstat 0 (reseting the thing) would make ur player unhittable.
Along side other codes etc.

And when you do cstator 257 your player becomes hittable again (maybe). Works on mobs when I do that for enemies.
Even from radius explosion it doesn't hit you.
Never tried for player before by that way.
except
In Oblivion has this thing, from one of the weap when you shoot the mirror and bounces back to you, makes you unkillable for a few seconds even from explosions.
Accidentally did that by messing around with the shrinker by replacing it with the "muddler gun"


I do that for some bosses and works. ( spawn an inv sprite that blocks so when the boss eye becomes unhittable your bullet or projectile doesn't go "through it")
LIZTROOP seems to be affected when hiding they die from radius explosion as soon they reappear. Probably they didn't remove the 256 (still hittable by weapons radius) dunno.
But NOT my bosses when their eye are closed.


Also never tried a 1shot kill thing.
I only have very massive damaging weapons but can hit you too.
Large hitarea and massive dmg.

Projectile example does hitarea 20000 200 230 260 290 & higher.. or something
A bit like the BFG9000 of doom type.

"Note that the damage inflicted by hard-coded projectiles is also split in four sections (25%, 50%, 75% and 100%)."

Trip bombs in Oblivion does nasty damage. Ur player can die if not hidden behind a wall where the *hit area* cannot strike you or you're too far from the blast.

In USER.CON.
Its radii is.
define TRIPBOMBBLASTRADIUS 18666
Damage
define TRIPBOMB_STRENGTH 900

In game.con. inside EXPLOSION2 actor.
ifspawnedby TRIPBOMB { palfrom 63 63 63 63 }
to make a violent flash. (becomes like 99% bright)

This post has been edited by Zaxtor: 10 November 2014 - 05:03 AM

0

User is offline   The Commander 

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

#1553

Pro tip...
Dont always follow Zaxtor advice in CON editing unless you want 4MB CON files.
1

User is offline   Zaxtor 

#1554

I wanna make a "replica" for the pipebomb.

What are the defineprojectile code placement to make a pipebomb.

Example (non pipebomb projectile).

defineprojectile 6561 PROJ_WORKSLIKE 2
defineprojectile 6561 PROJ_TRAIL 6044
defineprojectile 6561 PROJ_TNUM 1
defineprojectile 6561 PROJ_VEL 620
defineprojectile 6561 PROJ_EXTRA 17
defineprojectile 6561 PROJ_HITRADIUS 1268
defineprojectile 6561 PROJ_SPAWNS EXPLOSION2


But what I want is the stuff to make a pipebomb.
Throws like one.
Bounce like one.
Except I put a different PROJ_SPAWNS when it goes off by remote or by something hitting it.


Cus I wanna make when the player takes an enhancement.
He will throw the same type of pipebomb that behaves exactly the same as the Duke pipebomb.
Except it spawns a stronger explosion yield. (explodes harder).

I have all the thing working all is left is to make the projectile but can't find any source to "simulate" the pipebomb.

blah blah blah
with setvar WEAPON5_SHOOTS XXXXX Inside the aplayer actor


So when he get the enhancement he shoots a different pipebomb actor, acts like same one except spawns deadlier explosion (like mentioned above)

This post has been edited by Zaxtor: 16 November 2014 - 02:12 PM

0

Share this topic:


  • 124 Pages +
  • « First
  • 50
  • 51
  • 52
  • 53
  • 54
  • 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