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

Jump to content

  • 119 Pages +
  • « First
  • 53
  • 54
  • 55
  • 56
  • 57
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Mark 

#1621

I checked a bunch of project folders on my drive and many have the choices blank but not removed so I'm guessing there is no easy way to do it.
0

User is offline   Danukem 

  • Duke Plus Developer

#1622

So what is the best way to prevent the episode 4 cutscene from starting these days? Should I do something in EVENT_CUTSCENE? Setting RETURN to -1 makes it show the first frame of the video and then pause until I press a key.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #1623

 Trooper Dan, on 01 July 2015 - 03:21 PM, said:

So what is the best way to prevent the episode 4 cutscene from starting these days?

http://wiki.eduke32....wiki/LOGO_FLAGS
1

User is offline   m210® 

#1624

I want try to write my code of BloodCM in Lua and I have a one question:
Can I submit a variable from one lua-class to other lua-class?

I must use a function?

Why doesn't work suck code
-- Main.lua

module(...)
se = con.actorvar(0)
require "end_gamevars"

local se64 = require("se64")


and I have an error in se64 lua class:

-- SE64.lua

local se = se

"attempt to read undeclared variable 'se' "

Can I submit se variable from Main to SE64?

This post has been edited by M210: 10 July 2015 - 08:30 AM

0

User is offline   Zaxtor 

#1625

(edited it)
Cus someone told me how. No need for that post.

This post has been edited by Zaxtor: 22 July 2015 - 08:22 AM

0

User is offline   xenoxols 

#1626

How do you add more frames to a weapon's animation/make a new animation?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #1627

Take the weapons.con.sample from the samples/ folder and add it to your CONs. This will draw the weapons from CON code, and you can make your modifications based on that.
0

User is offline   xenoxols 

#1628

Thanks. Is there something like tilefromtexture that doesn't palette the graphic?
0

#1629

Hello everyone! Is it possible to monitor a player touches the wall or not?
I tried ifawayfromwall - works only on border of two sectors. On a step for example. If to stand at a wall, distance too big. Player too thick

This post has been edited by Mr. Alias Nameless: 04 September 2015 - 12:34 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#1630

View PostMr. Alias Nameless, on 04 September 2015 - 12:34 AM, said:

Hello everyone! Is it possible to monitor a player touches the wall or not?
I tried ifawayfromwall - works only on border of two sectors. On a step for example. If to stand at a wall, distance too big. Player too thick


You can use hitscan, but it's not easy. You would have to scan from the player's position at at least two different heights and many different angles. Then check the return values. If one of the scans hit a wall at nearby coordinates, then the player is "touching" the wall. If you require the player to be facing the wall, then it's only a few scans. I have some code which does this as part of the mantle check in DukePlus.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1631

View PostMr. Alias Nameless, on 04 September 2015 - 12:34 AM, said:

Hello everyone! Is it possible to monitor a player touches the wall or not?
I tried ifawayfromwall - works only on border of two sectors. On a step for example. If to stand at a wall, distance too big. Player too thick

http://wiki.eduke32.com/wiki/Htmovflag
0

User is offline   Danukem 

  • Duke Plus Developer

#1632

View PostFox, on 05 September 2015 - 01:08 PM, said:



That will help if he wants to know whether the player is pushing against a wall, but if the player is touching a wall without pushing against it, it won't help.
1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1633

I am thinking of storing the htmovflag from the last time the player moved.
0

User is offline   Mark 

#1634

Hmmm. I wonder if detecting the player pushing a wall could be used in conjunction with another effect for doing something cool with that wall.

This post has been edited by Mark.: 05 September 2015 - 07:50 PM

0

User is offline   Mblackwell 

  • Evil Overlord

#1635

Well, with simple subtraction you could get the wallnum, so... yes!
0

#1636

Hey guys, is there a way to have a sound play when a secret place is discovered? Also, is there a way to make a separate sound for turning Goggles off?
0

User is offline   Jblade 

#1637

View PostDecember Man, on 12 September 2015 - 04:50 AM, said:

Hey guys, is there a way to have a sound play when a secret place is discovered? Also, is there a way to make a separate sound for turning Goggles off?

Yeah - I only have time to give you code for the first, the easiest way is to detect if the 'Secret found!' quote is displayed on screen. You can stick this anywhere in the APLAYER actor:
ifvare player[THISACTOR].fta 99 // is a quote being displayed?
{
ifvare player[THISACTOR].ftq 9 // is it the 'secret found!' quote?
	soundonce SECRETFOUND // play this sound
}

I'm sure it would work with checking the sector lotag as well but I haven't tested that.

This post has been edited by Jblade: 12 September 2015 - 05:02 AM

0

#1638

View PostJblade, on 12 September 2015 - 05:01 AM, said:

Yeah - I only have time to give you code for the first, the easiest way is to detect if the 'Secret found!' quote is displayed on screen.


Thanks man. I'm a total beginner and I'm learning con editing through eduke wikia and pure trial and error. I guess I figured it out that the way to do it was through detecting the quote, just had no idea how to do it. Thanks again!
0

User is offline   Hendricks266 

  • Weaponized Autism

  #1639

View PostDecember Man, on 12 September 2015 - 07:46 AM, said:

Thanks man. I'm a total beginner and I'm learning con editing through eduke wikia and pure trial and error. I guess I figured it out that the way to do it was through detecting the quote, just had no idea how to do it. Thanks again!

Be warned that the quote method will not work if the player has messages turned off with F8.

Unfortunately, I can't find any events that run before the game checks for sector lotag 32767 and sets it to zero, but this is the best I can do:

gamevar previous_secret_rooms 0 1

onevent EVENT_GAME
    ifactor APLAYER
    {
        ifvarvarg player[THISACTOR].secret_rooms previous_secret_rooms
            globalsound BAR_MUSIC

        getplayer[THISACTOR].secret_rooms previous_secret_rooms
    }
endevent

2

#1640

View PostHendricks266, on 12 September 2015 - 09:09 AM, said:

Be warned that the quote method will not work if the player has messages turned off with F8.


Makes sense. Thanks man.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1641

View PostHendricks266, on 12 September 2015 - 09:09 AM, said:

but this is the best I can do:

It's flawless as far I can tell, except for some multiplayer nuisances.
0

#1642

Don't wanna outstay my welcome, but is it possible to implement a sound when Duke is drowning (losing HP) and a different sound when he gets out of the water after he was drowning - different than when he wasn't?
0

User is offline   Mblackwell 

  • Evil Overlord

#1643

If you check http://wiki.eduke32.com/wiki/Airleft that should give you a signal to let you play a sound. Like the previous code it's best to check both if it's 0 (drowning) and then save the last value and see if it was also zero. If the current value is non-zero but the previous value was then you know to play a gasping sound or whatever you have planned.
0

#1644

View PostMblackwell, on 13 September 2015 - 10:55 AM, said:

If you check http://wiki.eduke32.com/wiki/Airleft that should give you a signal to let you play a sound. Like the previous code it's best to check both if it's 0 (drowning) and then save the last value and see if it was also zero. If the current value is non-zero but the previous value was then you know to play a gasping sound or whatever you have planned.


Ok, now I know what, but I don't know how. Sorry.
0

User is offline   Mblackwell 

  • Evil Overlord

#1645

... If it's 0 then you are out of air.

eg
gamevar AIR_LEFT 0 1
gamevar AIR_LEFT_LAST 0 1
onevent EVENT_GAME
    ifactor APLAYER
    {
        getplayer[THISACTOR].airleft AIR_LEFT
       
        ifvarvarn AIR_LEFT AIR_LEFT_LAST ifvare AIR_LEFT_LAST 0
            soundonce MY_GASP_SOUND
        else ifvare AIR_LEFT 0
            soundonce MY_DROWNING_SOUND
        
        setvarvar AIR_LEFT_LAST AIR_LEFT
    }
endevent

0

#1646

View PostMblackwell, on 15 September 2015 - 03:21 PM, said:

... If it's 0 then you are out of air.


Thanks for your patience, however at the beginning of the first level of an episode or a user level the gasp for air (not drowning) sound can be heard. Subsequent levels for some reason do not have this problem.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #1647

View PostMblackwell, on 15 September 2015 - 03:21 PM, said:

gamevar AIR_LEFT 0 1
gamevar AIR_LEFT_LAST 0 1
onevent EVENT_GAME
    ifactor APLAYER
    {
        getplayer[THISACTOR].airleft AIR_LEFT
       
        ifvarvarn AIR_LEFT AIR_LEFT_LAST ifvare AIR_LEFT_LAST 0
            soundonce MY_GASP_SOUND
        else ifvare AIR_LEFT 0
            soundonce MY_DROWNING_SOUND
        
        setvarvar AIR_LEFT_LAST AIR_LEFT
    }
endevent


Fixes:
AIR_LEFT doesn't need to be per-player. Its value isn't kept between tics.
The sound kept playing after the player dies from drowning.
The bug mentioned above.

gamevar temp 0 0
gamevar AIR_LEFT_LAST -1 1

onevent EVENT_GAME
    ifactor APLAYER
    {
        getplayer[THISACTOR].airleft temp

        ifvare AIR_LEFT_LAST -1
            setvarvar AIR_LEFT_LAST temp

        ifvarvarn temp AIR_LEFT_LAST ifvare AIR_LEFT_LAST 0
            soundonce BAR_MUSIC
        else ifvare temp 0
            ifp palive
                soundonce DUKE_KILLED1

        setvarvar AIR_LEFT_LAST temp
    }
endevent

0

#1648

It works! Thanks much!
0

#1649

Is it possible to detect what render mode is being used from within a CON file ? Specifically, I have a above + under water TROR sectors (which are also part of a more complex TROR map) and to stop HOM effects in software render mode I need to change the water texture to solid instead of transparent; i'm hoping that this can be accomplished via a CON file.

TTFN,
Jon
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1650

Yes.

http://wiki.eduke32.com/wiki/Rendmode
1

Share this topic:


  • 119 Pages +
  • « First
  • 53
  • 54
  • 55
  • 56
  • 57
  • 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