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

Jump to content

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

EDuke32 Scripting  "CON coding help"

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

User is offline   Zaxtor 

#1555

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!

#1556

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

User is offline   Jblade 

#1557

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!

#1558

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

#1559

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!

#1560

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

User is offline   Micky C 

  • Honored Donor

#1561

Custom effects.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#1562

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 

#1563

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

User is offline   Zaxtor 

#1564

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

#1565

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

User is online   Hendricks266 

  • Weaponized Autism

  #1566

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

User is offline   Zaxtor 

#1567

View PostHendricks266, on 15 December 2014 - 01:46 AM, said:

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






I don't think I need that.
What I mean is.
I made a Pseudopipebomb or pipebomb clone that we take.
The normal heavyhbomb is incharge for the rest.

The reason I made that "clone" like you know when you shoot or anything hit a heavyhbomb on the floor it blows up.
If you set the var of the enhancer it will make "all the heavyhbomb" make the super explosion.
So to not make that I cloned the pipebomb (item we take).
The Pseudopipebomb doesn't make the "Super explosion" when you shoot it, it get shot or destroyed if never taken.


The Pseudopipe bomb is to prevent untaken pipebomb from making "Super explosion" of the enhanced pipebomb,
The enhanced pipebomb thing works, All I need is just the hitradius of the pipebomb in numbers or etc to the Pseudopipebomb (A_PIPEBOMB).

Its code

actor A_PIPEBOMB
 sizeat 9 9
 cstator 256
  fall
  ifmove RESPAWN_ACTOR_FLAG
    state respawnit
  else
    ifp pshrunk nullop
    else
      ifp palive
        ifcount 6
          ifpdistl RETRIEVEDISTANCE
            ifcanseetarget
      {
        addweapon HANDBOMB_WEAPON HANDBOMBAMOUNT
        quote 55
        ifspawnedby A_PIPEBOMB
          state getcode
        else
          state quikget
      }
 ifhitweapon { hitradius xxxx xx xx xx sound PIPEBOMB_EXPLODE spawn EXPLOSION2 debris SCRAP1 3 debris SCRAP6 4 killit }

enda



All I need is the radius.

This post has been edited by Zaxtor: 15 December 2014 - 06:52 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1568

What Hendricks posted would be more appropriate, but I will make it easier for you:
hitradius PIPEBOMBRADIUS 625 1250 1875 2500

0

User is offline   Zaxtor 

#1569

View PostFox, on 15 December 2014 - 08:04 AM, said:

What Hendricks posted would be more appropriate, but I will make it easier for you:
hitradius PIPEBOMBRADIUS 625 1250 1875 2500





Hundreds and thousands in the strength???
That would be a deadly pipebomb.

I need a radius that does the same damage as the normal heavyhbomb.
0

User is online   Hendricks266 

  • Weaponized Autism

  #1570

View PostFox, on 15 December 2014 - 08:04 AM, said:

What Hendricks posted would be more appropriate, but I will make it easier for you:
hitradius PIPEBOMBRADIUS 625 1250 1875 2500


I think you did the math wrong...

define HANDBOMB_WEAPON_STRENGTH 140

Also not that we're shifting right and not left.
1

User is offline   Zaxtor 

#1571

I just need the hitradius thing.

Like a replica of the hit radius of the explosion when you destroy the pipebomb from shooting it.


When you take it and rethrow it it becomes the normal pipebomb as suppose to. Why applied the enhancement if you took the enhancement (set var etc)


I made the replica so when you take the enhancement it doesn't make the untaken (never touch before) pipebomb make a super explosion if the bomb get accidentally shot or blown up by you or an enemy from shooting the pipebomb.



Everything works
All I need is the replica of the hitradius of the pipebomb.
Because I want it to explode the same when you shoot it, etc.

If the message doesn't work
I mind make a video of what I mean.

This post has been edited by Zaxtor: 15 December 2014 - 04:37 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1572

View PostZaxtor, on 15 December 2014 - 02:43 PM, said:

Hundreds and thousands in the strength???
That would be a deadly pipebomb.

I need a radius that does the same damage as the normal heavyhbomb.

LOL
hitradius PIPEBOMBRADIUS 35 70 105 140

2

User is offline   Zaxtor 

#1573

View PostFox, on 15 December 2014 - 05:27 PM, said:

LOL
hitradius PIPEBOMBRADIUS 35 70 105 140



thx
0

#1574

On the wiki I cannot find the right vars and/or bitfields for disabling any polymer effect on certain sprites; there are only global console controls and htflags bits for avoid light emission, but not for effects from sources. Actually, i don't know if there is what i search.

I need it for disabling polymer lights on snowflake sprites only for my new snow code; it runs fine on polymost, but lights cast on falling snow drop the fps to ~5.
I could remove polymer features at all, but is not reasonable for 1-2 line of code, if this is possible.

Can anyone help me ?
0

User is online   Hendricks266 

  • Weaponized Autism

  #1575

http://hendricks266....ymer_lights.con
0

#1576

Hendricks, my request was different: avoid that light affects specific actors, not removing some lights at all.

This post has been edited by RichardStorm: 30 December 2014 - 02:05 AM

0

User is offline   Diaz 

#1577

I think I've asked for something similar in the past - sprite foliage affected by Polymer lights in my maps was rendered multiple times, killing FPS. There was no solution back then, maybe there is now.
0

User is offline   blizzart 

#1578

Hello guys,
to have a countdown in a map which ends the map, if it's not finished in the given time, has been seen several times. But is it possible to have a countdown for a complete episode (maybe even hub-maps connected) either.
The idea behind this:
a mod, where the player's time is running up to complete a task (or the episode). Best, if the player could go back and forth through the maps by a hub system. After two hours for example the whole game ends if the player hasn't completed the task.

So is something like this possible at all or is this sticker to single maps?

Any suggestions here?
Thank you in advance.
0

User is offline   Mark 

#1579

I'm thinking you will piss off a bunch of players if they get shut down when they were seconds or minutes away from finishing the whole episode. Unless you still have the save game feature. I have no idea if saved games handle countdowns.

This post has been edited by Mark.: 03 January 2015 - 03:50 PM

0

User is offline   Jblade 

#1580

How do I get an enemy to move through a TROR layer? He flies right up to the top of the sector and then just flails about randomly.
0

User is offline   The Commander 

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

#1581

Sounds exactly how enemies react in water sectors.
0

User is offline   Jblade 

#1582

View PostJblade, on 26 January 2015 - 01:03 AM, said:

How do I get an enemy to move through a TROR layer? He flies right up to the top of the sector and then just flails about randomly.

Bumping because this is a fairly important thing I need to get working.
0

User is online   Hendricks266 

  • Weaponized Autism

  #1583

You might need to run clipmove on your sprite and detect if the ceiling it hits calculate if the sprite's Z coordinate is the highest it will go in the sector considering clipping (by looking at the function for it in the source code), detect if the ceiling in question is a TROR surface, and if so warp the sprite yourself.
1

Share this topic:


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