Trooper Dan, on 02 October 2015 - 01:22 PM, said:
I'm not entirely sure what you are asking, but you might be saying that when you spawn an enemy, the max number of kills in the map does not get increased. If that's the case, then you can fix that by reading/writing the following:
http://wiki.eduke32....x_actors_killed
D'oh !

Yes, that is what I need, I thought I'd searched the wiki thoroughly, it just didn't click that it'd be a per-player thing which, of course, now seems obvious. Cheers ! Yes, I want (in theory at least) to be able to have infinite respawns, I think it may be of encouraging players not to revisit an area too often which they can take as a hint they are going the wrong way. After all, if Duke has cleared an area, why wouldn't the aliens send in re-inforcements?
Anyhow, when I detect a player triggering one of my respawns alls I'll know is the player's THISACTOR value. How would I convert this to the relevent index into the player structures ? Or is the script system smart enough such that getplayer[THISACTOR] will re-interpret THISACTOR for me ? Or should I just ignore multiplayer and use getplayer[0] ? (I don't play multiplayer and I'm sure I read somewhere that current Eduke versions aren't multiplayer anyway?).
Trooper Dan, on 02 October 2015 - 01:22 PM, said:
You can try this command:
http://wiki.eduke32....activatormotion
IIRC it only works in certain contexts. I ended up making my own special activators by looping through sprites and changing, checking per-actor gamevars.
I couldn't see how to use checkactivatormotion. At the moment I've implemented what you have done, my own activator system and grouping sprites as a chains of groups of sprites (debugging a linked list of linked lists in a primitive script language and no debugging tools nearly did for what little is left of my sanity!). Unfortunately it does mean I need helper sectors (e.g. a door) to translate a standard activator to jonz system, which is a nuiscence.
Can you provide any further info on the contexts in which Checkactivatormotion works ?
Currently my main game loop looks like this:
gamevar ticky 0 0
gamevar startupdebug 1 0
// Called once per "tic" _per_ _actor_. Not clear if this gets called for actors that the
// game has decided are temporarily zombied ? Jonz sprites are not useractors so maybe
// will never be zombied ??
onevent EVENT_GAME
ifvarn startupdebug 0
{
... dump some debug stuff
setvar startupdebug 0
}
// Fudge: There is no event that runs once per tick so we need to infer one.
// Ticks are roughly in milliseconds. This is NOT accurate for multiplayer
// and game should never sync to this for multiplayer. TODO: Use what else?
getticks temp1
setvarvar temp2 temp1
subvarvar temp2 ticky
ifvarg temp2 33 // Roughly 30 times per second. Ish.
{
setvarvar ticky temp1
// Process jonz main sprite system
// This is more efficient this way otherwise I'd be searching chains of
// groups of sprites for every actor on every tick. What I need is an EVENT_GAME
// that runs once per game tic but there isn't one ?
state process_allsectormonitors
state update_sectorchangers
//state move_sprite_groups TODO
// TODO : revise this if how sounds are played is influenced by THISACTOR
state update_jsounds
}
// These effects may spawn objects so will only work if THISACTOR is correctly set.
state update_alljeffects
state update_alljrespawns
endevent
It has happened this way because I'm not confident about when, or what happens, should my sprites get marked by Eduke as zombied because the player hasn't seen them in a while (however they are _not_ useractors). Also unless I've missed something there is no event that fires once per game tick - plus I dont know the interval of a game tick.
TTFN,
Jon