Fox, on 26 July 2012 - 01:36 PM, said:
I know it's lame, but he has good reason to not want to modify the enemy code. Once you start doing that, your code becomes much less portable.
Fox, on 26 July 2012 - 01:36 PM, said:
Trooper Dan, on 26 July 2012 - 12:06 PM, said:
Reaper_Man, on 27 July 2012 - 03:59 PM, said:
onevent EVENT_EGS
ifspawnedby RESPAWN
{
// etc.
This post has been edited by Reaper_Man: 27 July 2012 - 05:05 PM
Reaper_Man, on 27 July 2012 - 04:41 PM, said:
getactor[THISACTOR].picnum picnum
switch picnum
case LIZTROOP
case LIZTROOPSTAYPUT
case LIZTROOPSHOOT
case LIZTROOPJETPACK
case LIZTROOPRUNNING
case LIZTROOPONTOILET
case LIZTROOPJUSTSIT
case LIZTROOPDUCKING
// do whatever
break
case PIGCOP
case PIGCOPDIVE
case PIGCOPSTAYPUT
// etc.
This post has been edited by Biturbo: 04 August 2012 - 05:09 AM
define LIGHTING_ICON 3589
gamevar timecounter 0 0
gamevar okay 0 1
gamevar sector_pos 0 0
onevent EVENT_DISPLAYROOMS
ifrnd 0
{
ifrnd 64
{
soundonce THUNDER
setvar okay 1
}
}
endevent
useractor notenemy LIGHTING_ICON
{
cstat 32768
getactor[THISACTOR].sectnum sector_pos
ifvare okay 1
{
setsector[sector_pos].floorshade 20
setsector[sector_pos].ceilingshade 20
addvar timecounter 1
setvar okay 1
}
ifvare timecounter 40
{
setsector[sector_pos].floorshade 30
setsector[sector_pos].ceilingshade 30
setvar timecounter 0
setvar okay 0
}
}
enda
gamevar sector_pos 0 2
This post has been edited by James: 06 August 2012 - 06:39 AM
James, on 06 August 2012 - 06:38 AM, said:
gamevar sector_pos 0 2
define LIGHTING_ICON 3589
gamevar timecounter 0 2
gamevar okay 0 0
gamevar sector_pos 0 2
onevent EVENT_DISPLAYROOMS
ifrnd 0
{
ifrnd 64
{
soundonce THUNDER
setvar okay 1
}
}
endevent
useractor notenemy LIGHTING_ICON
{
cstat 32768
getactor[THISACTOR].sectnum sector_pos
ifvare okay 1
{
setsector[sector_pos].floorshade 20
setsector[sector_pos].ceilingshade 20
addvar timecounter 1
}
ifvare timecounter 40
{
setsector[sector_pos].floorshade 30
setsector[sector_pos].ceilingshade 30
setvar timecounter 0
setvar okay 0
}
}
enda
ifvare timecounter 40
{
setsector[sector_pos].floorshade 30
setsector[sector_pos].ceilingshade 30
setvar timecounter 0
}
This post has been edited by Biturbo: 07 August 2012 - 05:34 AM
Biturbo, on 07 August 2012 - 05:25 AM, said:
gamevar thunder_count 0 0
gamevar runonce 0 2
gamevar default_cshade 0 2 // to store the original sector shade
gamevar default_fshade 0 2 // to store the original sector shade
gamevar new_cshade 0 2
gamevar new_fshade 0 2
useractor notenemy LIGHTING_ICON
cstat 32768
ifvare runonce 0 // we only want to store the shade at its default value
{
getsector[THISACTOR].floorshade default_fshade
getsector[THISACTOR].ceilingshade default_cshade
setvar runonce 1
}
ifvarg thunder_count 30 // if the counter is above a good value
{
setvarvar new_cshade default_cshade
setvarvar new_fshade default_fshade
subvar new_cshade 10 // subtract! lower numbers are brighter numbers
subvar new_fshade 10
ifvarg thunder_count 35 // I made two stages of brightness for the heck of it
{
subvar new_cshade 10
subvar new_fshade 10
}
setsector[sector_pos].floorshade new_fshade
setsector[sector_pos].ceilingshade new_cshade
}
else // otherwise just keep the default/original sector shade
{
setsector[THISACTOR].floorshade default_fshade
setsector[THISACTOR].ceilingshade default_cshade
}
enda
actor APLAYER
ifvare thunder_count 0 ifrnd 16 // we only start counting sometimes
{
setvar thunder_count 1
}
else ifvarg thunder_count 0 // count as long as the var is more than 0
{
addvar thunder_count 1
ifvarg thunder_count 40 // reset it when it goes over the max value we want
setvar thunder_count 0
}
// rest of player code
enda
rasmus thorup, on 07 August 2012 - 11:27 AM, said:
Hendricks266, on 26 July 2012 - 06:21 PM, said:
This post has been edited by Biturbo: 02 September 2012 - 02:16 AM
onevent EVENT_PREGAME
{
ifvarn sprite[THISACTOR].htextra -1
{
redefinequote 254 Actor (%d) Extra (%d) Htextra (%d) Owner (%d)
qsprintf 254 254 THISACTOR sprite[THISACTOR].extra sprite[THISACTOR].htextra player[THISACTOR].i
echo 254
}
}
endeventActor (448) Extra (24) Htextra (9) Owner (644)
onevent EVENT_DISPLAYMENU myospal 160 100 3281 0 1024 0 endevent
This post has been edited by EmericaSkater: 17 September 2012 - 08:00 AM
EmericaSkater, on 17 September 2012 - 07:50 AM, said:
Mblackwell, on 17 September 2012 - 08:25 AM, said: