i.e;
onevent EVENT_FIRE
ifvare frozen_player 1 {
setvar RETURN 1
}
endevent
Haven't tested mind, I'm just going by the entry on the Wiki. And of course, replace "frozen_player" with whatever you are using instead.
onevent EVENT_FIRE
ifvare frozen_player 1 {
setvar RETURN 1
}
endevent
This post has been edited by High Treason: 09 October 2012 - 09:11 AM
action APROJFRAMES 0 1 5
useractor notenemy PROJ 0 APROJFRAMES enda
Mblackwell, on 09 October 2012 - 05:26 PM, said:
Hendricks266, on 10 October 2012 - 04:00 PM, said:
Reaper_Man, on 11 October 2012 - 12:35 PM, said:
This post has been edited by RichardStorm: 12 October 2012 - 03:50 AM
RichardStorm, on 12 October 2012 - 03:48 AM, said:
gamevar gid 0 2 // i call it "general id"
gamevar targetdist 0 2 // this stores the shortest target distance
gamevar temp 0 2 // temporary variables
gamevar tempb 0 2
gamevar tempc 0 2
gamevar mytarget 0 2 // self-explanatory
gamevar detectrange 0 2 // in build units, the maximum distance the sprite can see an enemy
state findnearenemy // put in in your ALLY...
setvar detectrange 20000 // for example
setvar targetdist 500000 // initialize distance at a big value
setvar gid 0 // you need to start from 0, also because if gid is something different it could not work or make Eduke freeze...
whilevarn gid 16384 // here start the loop, it stops when gid reaches 16384
{
switch sprite[gid].picnum // do this only with enemies; i use a switch
case LIZTROOP case LIZMAN case OCTABRAIN case PIGCOP case NEWBEAST
case GREENSLIME case ROTATEGUN case COMMANDER case DRONE case RECON
case BOSS1 case BOSS2 case BOSS3 case BOSS4 case TANK
case GOBELIN // EDIT as mentioned in post #977
ifvarn sprite[gid].statnum 1024 // if it's not "killed"
{
dist tempb gid THISACTOR // calculate distance between this sprite and the scanned enemy
ifvarvarl tempb detectrange ifvarvarl tempb targetdist // if it's within the detectrange and near than the previous
{
canseespr THISACTOR gid tempc // if there is a line of sight and ...
ifvarg sprite[gid].extra 0 ifvare tempc 1 // ... if its hit points are greater than 0
{ setvarvar owntargetid gid setvarvar targetdist tempb } // ok, set it as my enemy ... until i don't find the nearest
}
}
break // it refers to all enemy picnum cases
endswitch
addvar gid 1 // next instance of the loop, for sprite #1, #2, 3#, ... 22# ... #1728 ...
} // end of the loop structure
ends
This post has been edited by RichardStorm: 14 October 2012 - 12:52 AM
This post has been edited by RichardStorm: 14 October 2012 - 12:51 AM
zazo, on 14 October 2012 - 02:19 PM, said:
zazo, on 14 October 2012 - 02:36 PM, said:
Trooper Dan, on 14 October 2012 - 06:32 PM, said:
zazo, on 15 October 2012 - 04:10 AM, said:
action flyingaxeframe1 0 1 5 1 10
action flyingaxeframe2 5 1 5 1 10
action flyingaxeframe3 10 1 5 1 10
action flyingaxeframe4 15 1 5 1 10
useractor notenemy flyingaxe 0 flyingaxeframe1 enda //initialized to the first action
gamevar countvar 0 2
gamevar picnum 0 2
onevent EVENT_GAME
getactor[THISACTOR].picnum picnum
ifvare picnum flyingaxe {
addvar countvar 1
ifvarg countvar 1 {
setvar countvar 0
ifaction flyingaxeframe1 action flyingaxeframe2 else
ifaction flyingaxeframe2 action flyingaxeframe3 else
ifaction flyingaxeframe3 action flyingaxeframe4 else
ifaction flyingaxeframe4 action flyingaxeframe1
}
}
endevent
EmericaSkater, on 15 October 2012 - 04:31 AM, said:
action flyingaxeframe1 0 1 5 1 10
action flyingaxeframe2 5 1 5 1 10
action flyingaxeframe3 10 1 5 1 10
action flyingaxeframe4 15 1 5 1 10
useractor notenemy flyingaxe 0 flyingaxeframe1 enda //initialized to the first action
gamevar countvar 0 2
gamevar picnum 0 2
onevent EVENT_GAME
getactor[THISACTOR].picnum picnum
ifvare picnum flyingaxe {
addvar countvar 1
ifvarg countvar 1 {
setvar countvar 0
ifaction flyingaxeframe1 action flyingaxeframe2 else
ifaction flyingaxeframe2 action flyingaxeframe3 else
ifaction flyingaxeframe3 action flyingaxeframe4 else
ifaction flyingaxeframe4 action flyingaxeframe1
}
}
endevent
EmericaSkater, on 15 October 2012 - 04:31 AM, said:
gamevar countvar 0 2
gamevar picnum 0 2
onevent EVENT_GAME
getactor[THISACTOR].picnum picnum
ifvare picnum flyingaxe {
addvar countvar 1
ifvarg countvar 1 {
setvar countvar 0
ifaction flyingaxeframe1 action flyingaxeframe2 else
ifaction flyingaxeframe2 action flyingaxeframe3 else
ifaction flyingaxeframe3 action flyingaxeframe4 else
ifaction flyingaxeframe4 action flyingaxeframe1
}
}
endevent
Fox, on 17 October 2012 - 11:05 AM, said:
This post has been edited by RichardStorm: 17 October 2012 - 01:42 PM
RichardStorm, on 17 October 2012 - 01:33 PM, said:
zazo, on 18 October 2012 - 01:43 AM, said: