Home : Downloads : Forums : Contact Us Copyright

AMC Web Forums

  • April 22, 2019, 11:49:10 PM *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5

Author Topic: (Eduke) example code archive  (Read 50355 times)

FreeFrag

  • Member
  • Offline Offline
  • Posts: 3898
    • ICQ Messenger - 144729090
    • MSN Messenger - blaster_b4m
    • AOL Instant Messenger - FreeFragSGS
    • Yahoo Instant Messenger - freefragsgs
    • View Profile
    • WWW
    • Email
(Eduke) example code archive
« Reply #15 on: April 01, 2005, 06:45:39 PM »
Yes, custom load screens are possible. If you ever used the original EDuke 2.0 and noticed a techy loading screen when you fire up a custom map, that's a custom loading screen.
« Last Edit: April 01, 2005, 06:46:29 PM by BlasterDRP »
Logged
"In truth, I am nothing but a plodding mediocrity - please observe, a plodding mediocrity - for a mere mediocrity does not go very far, but a plodding one gets quite a distance."
-Benjamin Cardozo

Renegado

  • Member
  • Offline Offline
  • Posts: 455
    • View Profile
    • WWW
    • Email
(Eduke) example code archive
« Reply #16 on: April 01, 2005, 07:58:31 PM »
Quote
I'm really wanting the Keypad code - non buggy ofcourse, :D (Im guessing others are too)

Isn't a simple line of code, is a bit more complicated than that. Also, it can be achieved by different ways, so there isn't a "standard" keypad code.

Btw, to contribute a bit with this thread:

How to force the screen size (useful for people working in HUDS)
Code: [Select]
gamevar SCREENSIZE 0 1 // 0 = maximized

onevent EVENT_DISPLAYREST
setuserdef[THISACTOR].screen_size SCREENSIZE
endevent
« Last Edit: April 01, 2005, 08:02:27 PM by Renegado »
Logged
I am your father's brother's nephew's cousin's former roommate!
-RTCMīs EDuke Source Code Development Center
-Eduke Developerīs Journal
-Duke Espaņa

Quakis

  • Member
  • Offline Offline
  • Posts: 5378
    • MSN Messenger - quakis_962@hotmail.com
    • View Profile
    • WWW
    • Email
(Eduke) example code archive
« Reply #17 on: April 01, 2005, 08:03:47 PM »
I know its not a simple code, im not THAT stupid :P
Logged

James

  • Administrator
  • Member
  • Offline Offline
  • Posts: 13876
    • MSN Messenger - Jstanf36@ntlworld.com
    • View Profile
    • WWW
    • Email
(Eduke) example code archive
« Reply #18 on: April 01, 2005, 08:24:56 PM »
Thanks for the screen-size code Renegado - I couldn't figure for the life of me how to do that :blush:
Logged

DavoX

  • Guest
Re: (Eduke) example code archive
« Reply #19 on: May 18, 2007, 04:26:41 PM »
BUMP.

Ok so...i have this floor alligned sprite that changes it's shade everytime i shade the floor....i know i have to use SPRITENOSHADE but i don't know how, example? AND PLEASE WHERE I HAVE TO WRITE IT, IN WHAT CON, WHAT FILE, WHAT PLACE, ACCURATE EXAMPLE PLEASE BECAUSE I DON'T KNOW ANYTHING ABOUT CON CODING (i added a new sound yesterday and i was like WHOA).
Logged

Trooper Dan

  • Mario Nukem Team
  • Member
  • Offline Offline
  • Posts: 4243
  • EDuke32 Special Forces -- Code Ops
    • MSN Messenger - deeper-thought@hotmail.com
    • View Profile
    • Email
Re: (Eduke) example code archive
« Reply #20 on: May 18, 2007, 09:29:19 PM »
Example:

spritenoshade PIGCOP

Put that line in any con to get the effect (but not inside the code for an actor or a state).  Your safest bet is to put the line at the end of defs.con.  Of course, you would use the name of your tile, not "pigcop"  ^_^

If your tile doesn't have a name, then you can just use the number directly:

spritenoshade 2000

Or, you can give it a name first:

define MYTILE 5120 // or whatever
spritenoshade MYTILE
Logged
"Democracy never lasts long. It soon wastes, exhausts and murders itself. There was never a democracy that did not commit suicide." John Adams


Fissile Materials

DavoX

  • Guest
Re: (Eduke) example code archive
« Reply #21 on: May 19, 2007, 12:44:43 AM »
Thanks for being the only one to help me with this...it still doesn't work tho :(. The sprite is just a hitile texture. Don't know why it doesn't work :(
Logged

Trooper Dan

  • Mario Nukem Team
  • Member
  • Offline Offline
  • Posts: 4243
  • EDuke32 Special Forces -- Code Ops
    • MSN Messenger - deeper-thought@hotmail.com
    • View Profile
    • Email
Re: (Eduke) example code archive
« Reply #22 on: May 19, 2007, 01:35:27 AM »
Thanks for being the only one to help me with this...it still doesn't work tho :(. The sprite is just a hitile texture. Don't know why it doesn't work :(

It works on sprites.  Wall textures aren't sprites.
Logged
"Democracy never lasts long. It soon wastes, exhausts and murders itself. There was never a democracy that did not commit suicide." John Adams


Fissile Materials

DavoX

  • Guest
Re: (Eduke) example code archive
« Reply #23 on: May 19, 2007, 01:46:06 AM »
Well but you can use them as floor alligned sprites too  -_-

Anyway i got around to making it work!! what was happening was that mapster32 doesn't tell you that it's working, because when you turn shade preview ON it shows you that the sector DOES affect the shading, it's INGAME when the shading doesn't affect the sprite, so i have to turn preview OFF to see how it'll look ingame. Anyway i'm pretty sure that defining the name of the tile helped a lot to make it work, Thanks DT!
Logged

Trooper Dan

  • Mario Nukem Team
  • Member
  • Offline Offline
  • Posts: 4243
  • EDuke32 Special Forces -- Code Ops
    • MSN Messenger - deeper-thought@hotmail.com
    • View Profile
    • Email
Re: (Eduke) example code archive
« Reply #24 on: May 19, 2007, 02:29:19 AM »
it's INGAME when the shading doesn't affect the sprite

Oh, I thought you knew that.  None of the con commands do anything unless the con code is actually running.  Otherwise, all the monsters and shit would be moving around in mapster!
Logged
"Democracy never lasts long. It soon wastes, exhausts and murders itself. There was never a democracy that did not commit suicide." John Adams


Fissile Materials

DavoX

  • Guest
Re: (Eduke) example code archive
« Reply #25 on: May 19, 2007, 02:52:01 AM »
Well i guess i was mislead by the fact that con changes make appear the hitiles and models in mapster, i thought it was something like that... AGAIN I CAN'T CODE FOR SHIT  ^_^
Logged

Trooper Dan

  • Mario Nukem Team
  • Member
  • Offline Offline
  • Posts: 4243
  • EDuke32 Special Forces -- Code Ops
    • MSN Messenger - deeper-thought@hotmail.com
    • View Profile
    • Email
Re: (Eduke) example code archive
« Reply #26 on: May 19, 2007, 05:59:35 AM »
Well i guess i was mislead by the fact that con changes make appear the hitiles and models in mapster, i thought it was something like that... AGAIN I CAN'T CODE FOR SHIT  ^_^

No, con changes do not do that.  You are thinking of def files, like duke3d.def
Logged
"Democracy never lasts long. It soon wastes, exhausts and murders itself. There was never a democracy that did not commit suicide." John Adams


Fissile Materials

DavoX

  • Guest
Re: (Eduke) example code archive
« Reply #27 on: May 19, 2007, 06:39:41 AM »
Now i'm learning the differences hmmm interesting  -_-
Logged

James

  • Administrator
  • Member
  • Offline Offline
  • Posts: 13876
    • MSN Messenger - Jstanf36@ntlworld.com
    • View Profile
    • WWW
    • Email
Re: (Eduke) example code archive
« Reply #28 on: May 22, 2007, 08:35:31 PM »
I'm not sure if anybody here will find this useful, but I just recreated the standard HUD - this is useful incase you're making a mod and want to keep the default HUD but you don't want your stuff to overlap it.

Stick this in EVENT_DISPLAYREST (I'm assuming you have gamevars called TEMP and TEMP2 already defined)
Code: [Select]
rotatesprite 19 185 NORMALSIZE 0 30 0 0 0 0 0 xdim ydim
getactor[THISACTOR].extra TEMP
digitalnumber DIGITALNUM 19 191 TEMP 0 0 0 0 0 xdim ydim
rotatesprite 51 185 NORMALSIZE 0 31 0 0 0 0 0 xdim ydim
ifvare currentweapon 10
{
getplayer[THISACTOR].ammo_amount 5 TEMP
}
else
getplayer[THISACTOR].ammo_amount currentweapon TEMP
digitalnumber DIGITALNUM 51 191 TEMP 0 0 0 0 0 xdim ydim

getplayer[THISACTOR].inven_icon TEMP
ifvarn TEMP 0
{
rotatesprite 89 184 NORMALSIZE 0 33 0 0 0 0 0 xdim ydim
ifvare TEMP 1 // MEDKIT
{
rotatesprite 80 186 NORMALSIZE 0 2460 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].firstaid_amount TEMP2
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
}
ifvare TEMP 2 // STEROIDS
{
rotatesprite 80 186 NORMALSIZE 0 2469 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].steroids_amount TEMP2
divvar TEMP2 4
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
}
ifvare TEMP 3 // HOLODUKE
{
rotatesprite 80 186 NORMALSIZE 0 2470 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].holoduke_amount TEMP2
divvar TEMP2 24
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
getplayer[THISACTOR].holoduke_on TEMP2
ifvarn TEMP2 -1 minitext 96 180 500 0 0 else minitext 94 180 501 0 21
}
ifvare TEMP 4 // JETPACK
{
rotatesprite 80 186 NORMALSIZE 0 2467 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].jetpack_amount TEMP2
divvar TEMP2 16
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
getplayer[THISACTOR].jetpack_on TEMP2
ifvarn TEMP2 0 minitext 96 180 500 0 0 else minitext 94 180 501 0 21
}
ifvare TEMP 5 // NIGHT VISION GOGGLES
{
rotatesprite 80 186 NORMALSIZE 0 2461 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].heat_amount TEMP2
divvar TEMP2 12
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
getplayer[THISACTOR].heat_on TEMP2
ifvarn TEMP2 0 minitext 96 180 500 0 0 else minitext 94 180 501 0 21
}
ifvare TEMP 6 // SCUBA GEAR
{
rotatesprite 80 186 NORMALSIZE 0 2468 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].scuba_amount TEMP2
divvar TEMP2 64
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
minitext 92 180 502 0 21
}
ifvare TEMP 7 // BOOTS
{
rotatesprite 80 186 NORMALSIZE 0 2463 0 0 0 0 0 xdim ydim
getplayer[THISACTOR].boot_amount TEMP2
divvar TEMP2 2
digitalnumber THREEBYFIVE 97 193 TEMP2 0 0 0 0 0 xdim ydim
rotatesprite 104 191 NORMALSIZE 0 3076 0 11 0 0 0 xdim ydim
minitext 92 180 502 0 21
}
}

and stick this anywhere you like (make sure it's a con file though :HELLO:)
Code: [Select]
definequote 500       ON
definequote 501       OFF
definequote 502       AUTO

define NORMALSIZE 65536
There was a few ways to have the text displayed, but this way just seemed the most efficient :)

There's a few imperfections, since it's hard to accurately get everything in the exact same position, but it's almost exactly the same as the original so I hope it proves useful to someone else.
« Last Edit: May 23, 2007, 02:38:06 AM by James »
Logged

DavoX

  • Guest
Re: (Eduke) example code archive
« Reply #29 on: May 22, 2007, 09:06:14 PM »
I'm so using this, don't know why...but i am
:HELLO:

I guess it'll be useful in the future to me :)  (y) (y)
Logged
Pages: 1 [2] 3 4 5
 

(C) 2009, Alejandro Glavic. http://www.amcwebforums.com Go top