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

Jump to content

  • 124 Pages +
  • « First
  • 30
  • 31
  • 32
  • 33
  • 34
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Hendricks266 

  • Weaponized Autism

  #924

View PostRichardStorm, on 20 September 2012 - 04:23 AM, said:

'lil bump... How to make a piercing/trepassing rpg-type projectile ?

I believe you need to add code so that when any actor is hit by one, it shoots another one with the same values gathered from the ht* members.
0

User is offline   Mblackwell 

  • Evil Overlord

#925

View PostHendricks266, on 20 September 2012 - 04:15 PM, said:

I believe you need to add code so that when any actor is hit by one, it shoots another one with the same values gathered from the ht* members.


That's correct unless you do weird tricks like change the spritestat to actor, move the actor, and then change it back to a projectile. But now I've just confused the situation.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#926

View PostHendricks266, on 20 September 2012 - 04:15 PM, said:

I believe you need to add code so that when any actor is hit by one, it shoots another one with the same values gathered from the ht* members.

True, I did something like that with hitscan to make a Railgun. It worked very well in the end.

By the way, the Railgun in Shadow Warrior is veeery lame, while the trail spawns behind any actor (until it hits a wall), the shoot itself stops when it hits the first obstacle. So it gives the illusion of piercing, but in reality he doesn't do that.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #927

View PostFox, on 21 September 2012 - 12:08 AM, said:

By the way, the Railgun in Shadow Warrior is veeery lame, while the trail spawns behind any actor (until it hits a wall), the shoot itself stops when it hits the first obstacle. So it gives the illusion of piercing, but in reality he doesn't do that.

This is sadly true. I wanted to test the Railgun's capabilities so I made a test map with a ninja of every SW sprite pal (0-32) lined up in a very narrow corridor, with a dead end on one end and a window with a raised ledge on the other so I could shoot them with impunity. I was very disappointed when they took 33 shots to kill.
1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#928

Also I should point out that adding a hitscan trail in Eduke32 does the same thing: the shot gives the illusion of piercing when it doesn't.
0

#929

I think to use the coolexplosion type in some ways, but it seems to be invisible, not working, or broken... Anybody knows how to use it ? I would also appreciate the completion of voices in this page of the wiki http://wiki.eduke32..../PROJ_WORKSLIKE

This post has been edited by RichardStorm: 21 September 2012 - 02:57 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#930

You can make a projectile like Coolexplosion1 manually.
0

#931

Quote

You can make a projectile like Coolexplosion1 manually.
What do you mean ? I set PROJ_WORKSLIKE 512 and i get nothing...
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#932

By default you also need to set the Hitscan or RPG type as a basis.

But I meant to make a timed projectile with animation.

This post has been edited by Fox: 21 September 2012 - 04:05 AM

0

#933

If i set 514 i just obtain a rpg type, while the coolexplosion1 runs through some sprites... making it timed doesn't help.

This post has been edited by RichardStorm: 21 September 2012 - 07:38 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#934

That means you can't make it work as a coolexplosion using WORKSLIKE.

To make a projectile with animated frames, use a code like this:
onevent EVENT_GAME
  ifactor PROJ
  {
    ifaction PROJFRAME1
    {
      ifactioncount 1
        action PROJFRAME2
    }
    else
    ifaction PROJFRAME2
    {
      ifactioncount 1
        action PROJFRAME3
    }
 (...)
  }
endevent

0

#935

Damn.. now i understand... "runs through shades" it's referred to an "action" effect, not the "piercing" feature... it's an ambiguous definition...
I already found how to make an animated projectile, anyway ;)
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#936

CON code is so weird... I just figured that shoot command makes the cstat to 1.
0

#937

Really ? That could explain why my new devastator rockets explode on player when strafing/running (i just reduced player speed to avoid this), the 2nd rocket of the burst is actually fired with the shoot command. While i'm trying it, can you tell me if this oddity occurs also with zshoot,eshoot etc ?

This post has been edited by RichardStorm: 21 September 2012 - 03:48 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#938

Huh, that's a completely different matter. It would be cstat 256 that makes a projectile hit an object, and the player already has that.

The reason why the projectiles explode on you is simply because the speed of the player surpasses the projectile, making them collide.
0

#939

That only happens with second rocket, manually fired with shoot command, instead of the first rocket fired as normal. This is what i'm talking about:

state wep_devastator
...
 ifvare w_count 5 ifvarg ammo_devast 0       // w_count = player.kickback_pic
  { shoot MINIROCKET  subvar ammo_devast 1  setvar recoilstrength 15  sound DEVAST_FIRE1 }      //  the 2nd rocket
...
 setvar WEAPON4_FLAGS 0
 setvar WEAPON4_FIREDELAY 3
 setvar WEAPON4_TOTALTIME 6
 setvar WEAPON4_SHOTSPERBURST 1
 setvar WEAPON4_SHOOTS MINIROCKET       // the 1st rocket
....
ends



This post has been edited by RichardStorm: 21 September 2012 - 04:10 PM

0

User is offline   blizzart 

#940

Is there a way to make a sector with low-gravity? I'm currently working on a space map for our mod and at a specific point in the map, the gravity in several parts of the map is turned off/turned to low-gravity.
I mean something like when you move forward you more jump than actually walk. And when jumping you can jump higher than normal and sink slowly back to the ground.

Is something like this possible with EDuke32 and what do I have to look for?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#941

I suppose you could try messing with jumping_counter and falling_counter.
0

#942

There was a tutorial for altering the jump height; http://wiki.eduke32....player%27s_jump

I used that as a guide when I implemented a similar effect. There was also one for preventing fall damage (necessary for some of this and adds potential to exploit the mechanic in the level design) but keep in mind you will need to modify these somewhat to make them do what you want.

As for modifying player movement... I can't be much help there because everything I've tried to to in relation to the players walking has had no effect.
0

User is offline   LeoD 

  • Duke4.net topic/3513

#943

 High Treason, on 22 September 2012 - 02:36 PM, said:

As for modifying player movement...
The steroids jumping effect of DukePlus might be worth having a look at.
0

User is offline   zazo 

#944

Hum... Is it possible to encode the reverse command of "addweapon":
for example, duke could lose a weapon in the game. ?... when the weapon is empty or a monster steals a weapon ?...
0

User is offline   Danukem 

  • Duke Plus Developer

#945

 zazo, on 30 September 2012 - 02:19 PM, said:

Hum... Is it possible to encode the reverse command of "addweapon":
for example, duke could lose a weapon in the game. ?... when the weapon is empty or a monster steals a weapon ?...


Yes. Set the relevant player struct members. For example, if the weapon lost is the chaingun (weapon 3), then you could use the following code:

setplayer[THISACTOR].gotweapon 3 0 // player no longer has the chaingun
setplayer[THISACTOR].curr_weapon 0 // sets current weapon to mighty boot
setplayer[THISACTOR].ammo_amount 3 0 // takes chaingun ammo as well (optional)


You will need to use a variable if you want the weapon taken to be the current one, rather than a certain number.
0

User is offline   zazo 

#946

Thanks a lot, and what is the command to test the ammo amount, like "ifpinventory" for weapon ? shotgun for example ?

This post has been edited by zazo: 30 September 2012 - 02:59 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#947

 zazo, on 30 September 2012 - 02:56 PM, said:

Thanks a lot, and what is the command to test the ammo amount, like "ifpinventory" for weapon ? shotgun for example ?


ifvare player[THISACTOR].ammo_amount 2 0
{
// do stuff
}


That will execute the code in brackets when shotgun ammo is 0.
0

User is offline   zazo 

#948

 Trooper Dan, on 30 September 2012 - 03:03 PM, said:

ifvare player[THISACTOR].ammo_amount 2 0
{
// do stuff
}


That will execute the code in brackets when shotgun ammo is 0.

Thanks
0

User is offline   zazo 

#949

 zazo, on 30 September 2012 - 03:14 PM, said:

Thanks

possible to compare 2 variables :
for example: ifvarn variable1 variable2 { do stuff }
.. ?
seems not tp work
0

User is offline   Hendricks266 

  • Weaponized Autism

  #950

ifvarvarn
0

User is offline   Mblackwell 

  • Evil Overlord

#951

 blizzart, on 22 September 2012 - 01:41 PM, said:

Is there a way to make a sector with low-gravity? I'm currently working on a space map for our mod and at a specific point in the map, the gravity in several parts of the map is turned off/turned to low-gravity.
I mean something like when you move forward you more jump than actually walk. And when jumping you can jump higher than normal and sink slowly back to the ground.

Is something like this possible with EDuke32 and what do I have to look for?


Grab the values for posxv and posyv and divide them by 2 (for example). Slowing movement really is that simple (assuming you don't want to otherwise modify runningspeed). Also in EVENT_JUMP you can subtract from poszv to get a higher jump (there's a few ways of attacking that actually, but that might be the easiest).
0

User is online   Reaper_Man 

  • Once and Future King

#952

 Reaper_Man, on 18 September 2012 - 09:59 PM, said:

Feature request: Variants of dist / ldist which accept arbitrary X/Y/Z positions.

Curious if these have been implemented yet (been following the svn changelog but wasn't sure if I missed it).

Also, EVENT_PREGAME still seems jacked with non-hitscan weapons.
0

User is offline   zazo 

#953

is a noclip command exist in mapster32 that allow us to pass through walls in 3d mod ?
0

Share this topic:


  • 124 Pages +
  • « First
  • 30
  • 31
  • 32
  • 33
  • 34
  • 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