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

Jump to content

  • 119 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   Jblade 

#1531

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

User is offline   Zaxtor 

#1532

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

#1533

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!

#1534

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

User is online   Hendricks266 

  • Weaponized Autism

  #1535

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

User is offline   Mark 

#1536

Or sink into the floor.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1537

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 

#1538

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 

#1539

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!

#1540

Use EVENT_DISPLAYREST.
0

User is offline   Zaxtor 

#1541

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!

#1542

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 

#1543

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

#1544

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

  #1545

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 

#1546

View Postchuck 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...

#1547

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

User is offline   Zaxtor 

#1548

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

User is offline   Zaxtor 

#1549

Well discard post above.

I found a source code on 3dRealms, 8 years old, I normally avoid searching old stuff cus sometime they give obsolete stuff.


I duplicate it.

defineprojectile 14694 PROJ_WORKSLIKE 22598
defineprojectile 14694 PROJ_VEL 256
defineprojectile 14694 PROJ_EXTRA 182
defineprojectile 14694 PROJ_DROP -200
defineprojectile 14694 PROJ_BOUNCES 4
defineprojectile 14694 PROJ_BSOUND 13
defineprojectile 14694 PROJ_OFFSET 225
defineprojectile 14694 PROJ_CLIPDIST 24
defineprojectile 14694 PROJ_ISOUND 17
defineprojectile 14694 PROJ_HITRADIUS 3001
defineprojectile 14694 PROJ_SPAWNS EXPLOSION2

Problem is. the pipebomb (heavybomb) stays frozen in the air.

On the site, Deeperthoughts says is hardcoded and has no con for it.
That was 8 years ago, dunno if there is a solution someone may know today.

Thing I wanna make.
Is the thing behaving exactly like the pipebomb (heavy bomb).
Throwable, can be recovered.
Can be destroyed by being hit or detonated, Just like the normal.

Thing is an addon.
When player takes it.
It unlock a var to define WEAPONx stuff.
with setvar WEAPON5_SHOOTS 14694 Inside the aplayer actor


Inside explosion2 actor it has ifspawned by the 14694 thing {it does multi explosions etc}

Neither SHOOTS or SPAWN works.
I think pipebomb suppose to be a "spawn" but nothing happens, stays frozen in the air.

This post has been edited by Zaxtor: 16 November 2014 - 07:31 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1550

Any idea how I can make an useractor enemy move smoothly like the Drone or Commander?
0

User is offline   Jblade 

#1551

Ok, so mapster32 question - I'm not too familiar with it so forgive me. What's the optimal way to draw a line between 2 sprites? and in what event? basically I want to make one sprite find another sprite with a matching hitag and then draw a line to it. Cheers.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1552

What do you mean? To literally draw a line (wall) beetween them, or for them to face each other?
0

User is offline   Micky C 

  • Honored Donor

#1553

He wants to use mapster script to show a line between 2 sprites in 2D mode, linking them like locators (in a.m32?) so that it's easier to see what sprites are related to each other. The line is purely aesthetical.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1554

Doesn't that happens when you highlight a sprite with Shift?
0

User is offline   Micky C 

  • Honored Donor

#1555

Custom effects.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#1556

View PostJblade, on 29 November 2014 - 03:23 AM, said:

Ok, so mapster32 question - I'm not too familiar with it so forgive me. What's the optimal way to draw a line between 2 sprites? and in what event? basically I want to make one sprite find another sprite with a matching hitag and then draw a line to it. Cheers.

Actually, you can teach Mapster32 about the linking semantics of your custom actors, and the built-in functionality of drawing lines between matching sprites will be extended accordingly. From the wiki:

Quote

EVENT_LINKTAGS

triggered by the link-tagging system to query whether the tag of a particular sprite (which is the current sprite in this event) has a linking meaning. It is supposed to return in RETURN a bit-field of ORed values:
1: lotag has linking semantics
2: hitag
4: extra
8: xvel
16: yvel
32: zvel
64: owner


Otherwise, drawline16b or drawline16z are your friends.
2

User is offline   Jblade 

#1557

Interesting stuff...I'll take a closer look when I get time. thanks for pointing those things out!
0

User is offline   Zaxtor 

#1558

What is the exact { hitradius xxxx xx xx xx xx } of a pipebomb.

like the explosion radius of a pipebomb.
0

User is offline   The Commander 

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

#1559

Should be able to find that in source code or return it's value to a var.
0

User is online   Hendricks266 

  • Weaponized Autism

  #1560

View PostZaxtor, on 14 December 2014 - 10:32 PM, said:

What is the exact { hitradius xxxx xx xx xx xx } of a pipebomb.

like the explosion radius of a pipebomb.

The control for detonation is some funky shit, but the part you ask about is this:

                    int32_t j;

                    x = s->extra;
                    m = 0;
                    switch (DYNAMICTILEMAP(s->picnum))
                    {
                    case HEAVYHBOMB__STATIC:
                        m = g_pipebombBlastRadius;
                        break;
                    case MORTER__STATIC:
                        m = g_morterBlastRadius;
                        break;
                    case BOUNCEMINE__STATIC:
                        m = g_bouncemineBlastRadius;
                        break;
                    }

                    A_RadiusDamage(i, m,x>>2,x>>1,x-(x>>2),x);
                    j = A_Spawn(i,EXPLOSION2);
                    A_PlaySound(PIPEBOMB_EXPLODE,j);
                    if (s->zvel == 0)
                        A_Spawn(i,EXPLOSION2BOT);
                    for (x=0; x<8; x++)
                        RANDOMSCRAP;


Where g_pipebombBlastRadius is the tenth parameter of gamestartup (defined in the stock USER.CON as PIPEBOMBRADIUS), and x = getactor[<pipebomb actor>].extra = the strength of the HEAVYHBOMB actor (defined by default as HANDBOMB_WEAPON_STRENGTH).

So:

setvar temp1 HANDBOMB_WEAPON_STRENGTH
shiftvarr temp1 2
setvar temp2 HANDBOMB_WEAPON_STRENGTH
shiftvarr temp1 1
setvar temp3 HANDBOMB_WEAPON_STRENGTH
subvarvar temp3 temp1
hitradiusvar PIPEBOMBRADIUS temp1 temp2 temp3 HANDBOMB_WEAPON_STRENGTH

0

Share this topic:


  • 119 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