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

Jump to content

  • 120 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"

#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 offline   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

User is offline   fgsfds 

#954

'n (apostrophe and n)
0

User is offline   zazo 

#955

My idea seems complex: I would like to create coins that duke can take to buy weapons in shops and drink.
How to implement a variable for all the maps of a gameplay, and display the inventory "number of coins" on the screen above the status bar ?...
command to write and draw on the screen ?...
0

User is offline   Hendricks266 

  • Weaponized Autism

  #956

1. Try using a per-player variable.

gamevar coins 0 1

2. This is where events come in handy. Try EVENT_DISPLAYREST and digitalnumber.

onevent EVENT_DISPLAYREST
    digitalnumber DIGITALNUM 20 159 coins 0 0 8 0 0 xdim ydim
endevent

0

User is offline   zazo 

#957

 Hendricks266, on 06 October 2012 - 11:29 AM, said:

1. Try using a per-player variable.

gamevar coins 0 1

2. This is where events come in handy. Try EVENT_DISPLAYREST and digitalnumber.

onevent EVENT_DISPLAYREST
    digitalnumber DIGITALNUM 20 159 coins 0 0 8 0 0 xdim ydim
endevent



Is it possible to display a typo smaller: like the command "quote" (tiles 2837...) or possible to resize the digitalnum ?
I would also create two cool stuffs:
-a special item that reveals the whole map: the equivalent of the cheat code "dnshowmap"
-I'd like to know how to reproduce the effect of slow motion that exists in the tc "amc": action is slowed when the screen is full of action or killing a boss...
Thank you in advance
0

User is offline   Hendricks266 

  • Weaponized Autism

  #958

 zazo, on 07 October 2012 - 02:40 PM, said:

Is it possible to display a typo smaller: like the command "quote" (tiles 2837...) or possible to resize the digitalnum ?

digitalnumberz can resize the number. If you want to display text you can use gametext/gametextz or minitext. If you want to include numbers in the text, use qsprintf to assemble the quote.

 zazo, on 07 October 2012 - 02:40 PM, said:

-a special item that reveals the whole map: the equivalent of the cheat code "dnshowmap"

Copy the code for one of the items or pickups in the original CONs, like ATOMICHEALTH. Instead of adding health, have it:

setuserdef[THISACTOR].showallmap 1

 zazo, on 07 October 2012 - 02:40 PM, said:

-I'd like to know how to reproduce the effect of slow motion that exists in the tc "amc": action is slowed when the screen is full of action or killing a boss...

The command for this is inittimer.

 zazo, on 07 October 2012 - 02:40 PM, said:

Thank you in advance

No problem!
0

User is offline   zazo 

#959

 Hendricks266, on 07 October 2012 - 02:53 PM, said:

digitalnumberz can resize the number. If you want to display text you can use gametext/gametextz or minitext. If you want to include numbers in the text, use qsprintf to assemble the quote.


Copy the code for one of the items or pickups in the original CONs, like ATOMICHEALTH. Instead of adding health, have it:

setuserdef[THISACTOR].showallmap 1


The command for this is inittimer.


No problem!

the bullet time effect is a very cool stuff !!
0

User is offline   zazo 

#960

I looked at the command "define PROJECTILE_..." to create a new projectile but I do not see where to make a sprite with 5 sides to simulate a 3D appearance as the "rpg" proj ??
This new projectile would have the effect of paralyzing the player body:
for the time of paralysis :
setplayer[THISACTOR].posx x
setplayer[THISACTOR].posy y
getplayer[THISACTOR].posx x
getplayer[THISACTOR].posy y
but how to disable the firing key to prevent the player to shoot ?... ;)
0

Share this topic:


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