Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sat Nov 16, 2002 7:26 am   

trigger help
 
tradwars 2002 question. Im trying to make a trigger that just keeps on scanning the adjacent sectors (density scan) and as soon as the density changes in any of the sectors next to me I want to fire a photon missle into the sector the density changes in. not sure how to go about doing this. Do I use an alarm? any help is greatly appreiciated
the command for desity scan is (sd) and to fire a photon is (cpy####) a ship in an adjacent sector will show up as 40 an empty sector is 0. a sector with a port shows up as 100 so a sector with a ship and a port would be 140. im lost here but im sure this can be done.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Nov 16, 2002 8:25 am   
 
Requirements....
 Desnity Scan text patterns for triggers?
  Should we permenantly store densities?
 End text to activate check of previous scan?
 Variable holding current scan data.
 Variable holding previous scan data.
 Alias to compare datas.
  Sends photon on delta of 40 (send cpy#### where #### is sector;send ???? to return to main menu)?
   Should this terminate scanning?
   Should this move to sector?
    Should this execute a holo-scan first?
  Starts next scan unless condition (send sd).
 What you want as a control condition?

Fill in the things with question marks and I can probably fill in the rest.
Reply with quote
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sat Nov 16, 2002 8:46 am   
 
Requirements....
Desnity Scan text patterns for triggers? (yes)
Should we permenantly store densities? (no)
End text to activate check of previous scan (yes if scan changes we want to photon the sector the change happend in, could be up to 6 sectors around us if it did not change keep running)
Variable holding current scan data.
Variable holding previous scan data.
Alias to compare datas.
Sends photon on delta of 40 (send cpy#### (#### is the sector # change happened in) where #### is sector;send ???? ( any of the adjacent sectors that have a change of 40 we want to photon that sector) to return to main menu)? (no need) ( any change of the adjacent sectors of 40 and we want to fire a photon into that sector)
Should this terminate scanning (yes)
Should this move to sector (no) might be a bigger ship halo scan would be good.
Should this execute a holo-scan first (yes but only if density changes as halo scan uses a turn and density does not)
Starts next scan unless condition (send sd). (nope once photon is fired I want it to end)
What you want as a control condition? ( not sure what you mean here )

Fill in the things with question marks and I can probably fill in the rest.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Nov 16, 2002 7:47 pm   
 
#ALIAS autod {#TEMP {^-----------------} {#T+ Scanning;CurScan="";PrevScan=""};#SENDPROMPT sd}
#CLASS Scanning {disable}
#VAR CurScan {} {}
#VAR PrevScan {} {}
#TR {^Sector%s(%d)%s==>%s(%d)} {#ADDKEY Cur Scan %1 %2}
#TR {^$} {CompScans;#T- Scanning}
#CLASS 0
#VAR ScanDelta {} {}
#ALIAS CompScans {ScanDelta="";#LOOPDB @CurScan {#IF (%eval(%val-40)=%db(@PrevScan,%key)) {#ADDITEM ScanDelta %key}};#IF (@ScanDelta!=%null) {#SEND cpy%item(@ScanDelta,1)} {#TEMP {^-----------------} {#T+ Scanning;PrevScan=@CurScan;CurScan=""};#SENDPROMPT sd}}
Reply with quote
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sat Nov 16, 2002 7:55 pm   
 
wow, thank you so much!!!!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net