enum not running

Freeform discussion about anything related to modding Transcendence.
Post Reply
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

so i made this code to find all enemy ships in the system add them to a list to see when they have all been destroyed SPOILER I AM MODDING AGAIN and i cant seem to get the enum to run/work/do anything

code

Code: Select all

 <event1>
 (block nil 
 (dbglog "hi")
 (enum (sysFindObject gsource "sEA") ship 
 	(block nil (objRegisterForEvents gSource ship) (lnkAppend enemys ship)(dbglog ship) (dbglog "hi2")(objincdata gsource "enmycount") ))
 (dbglog enemys)	
 	)
 
</event1>
i did try useing sysFindObject gsource "A" to try and get anything but nope
and the event is running on a station just after it was created
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

Maybe specify ? Know your Enemy based onb the syslevel?
; Look for a major Ares station in the system
(setq stationList (sysFindObject gSource "T:aresMajor;A"))

; If we found at least one, then pick a random one
(setq gTarget (random stationList))

provoking any gears?

I found a few Ares : Or I should say , they found ME ! ( Note to Spoilers : that shield is not G.O.D., I did die in that game trying to get to the gate, it is normally on my personal stations ( storage, repairs ), I never tested it against Ares Phobi (?))
Last edited by shanejfilomena on Sat Apr 09, 2016 10:56 am, edited 1 time in total.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

sdw195 wrote:so i made this code to find all enemy ships in the system add them to a list to see when they have all been destroyed SPOILER I AM MODDING AGAIN and i cant seem to get the enum to run/work/do anything

code

Code: Select all

 <event1>
 (block nil 
 (dbglog "hi")
 (enum (sysFindObject gsource "sEA") ship 
 	(block nil (objRegisterForEvents gSource ship) (lnkAppend enemys ship)(dbglog ship) (dbglog "hi2")(objincdata gsource "enmycount") ))
 (dbglog enemys)	
 	)
 
</event1>
i did try useing sysFindObject gsource "A" to try and get anything but nope
and the event is running on a station just after it was created
Just to clarify, on your dbg log are you getting a "hi" or not? If you don't get the "Hi" dbglog then the entire block isn't running. For the enum, try using (setq shipList (sysFindObject gSource "sE" ship))
then run the enum on the set list. it may be it can't find a list on the run.
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

yes i am getting the "hi" in the log and even the no binding for symbol enemy the is after the enum
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

ooooo: Enemy SHIPS.....not Stations.

nvm
Last edited by shanejfilomena on Wed May 04, 2011 4:05 am, edited 1 time in total.
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

We know the code is running because he go "hi" back on his debug log. I would try setting the search as a list first (setq) then enum that list. It might make it work.
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

got it working with altereccos help this morning on irc :D
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Post Reply