![]() |
|
Star Wolves 3D space RPG with deep strategy and tactical elements |
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
It's really hard to say anything. Looks like some tables are involved too. IMO If it works in SW2 you should start modifying there until you understand every part of the script.
|
#2
|
|||
|
|||
![]() Quote:
I understand every part of the script, the Table is the randomcontacts list, which is stored in Randomcontacts.script and used multiple times in the function I modified (Check it out for yourself, look at the trigger_generator_Action function) I inserted the code between local flight = currentFunction(groupName, "randomformation_"..__formation_number, currentContact[3][portalStartIndex]:GetEntryPoint(10), strength, currentContact[3][portalStartIndex]:GetOrientation()); - This spawns the random contact. and __formation_number = __formation_number + 1; - This adds 1 to the formation number (Each spawned random conctact will be named like Flight_Randomformation_1, Flight_Randomformation_2, etc. etc. etc.) No reason why it should not work. None. |
#3
|
|||
|
|||
![]()
For higher purposes uncle Torrent can help you.
![]() Quote:
---- EDIT---- Hmm... the whole problem just get me interested. One thing I've found - your inserted code has the same variables names as are used for TRADER_FLIGHT (near the end of this function). This may effect with no escort and even no trader flights. IMO you should avoid using the same variables names for different purposes in the same function. Last edited by Goblin Wizard; 04-20-2010 at 11:53 AM. |
#4
|
|||
|
|||
![]() Quote:
Quote:
Quote:
--EDIT-- *HEADDESK* MY SCRIPT WAS WORKING THIS ENTIRE TIME. http://img442.imageshack.us/img442/5411/starwolves8.jpg I edited the Tug the player gets in the beginning to have 100000 Sensor length (basically, the whole map) and 0.2 Sensor resolution. I figured that would be enough to detect anything. Nope. Had to change sensor resolution to 0.0 for it to properly detect the escorts spawning becide the random contacts. Last edited by Nanaki; 04-20-2010 at 12:15 PM. |
#5
|
|||
|
|||
![]()
At last good news
![]() Let me know one thing - Is it possible to have 2 pilots in mothership like in SW2? and how? Last edited by Goblin Wizard; 04-20-2010 at 12:50 PM. |
#6
|
|||
|
|||
![]()
Grats nanaki, good idea with the tug; excellent debugging tool!
|
#7
|
|||
|
|||
![]()
Well, now I have to figure out how to do the despawn script. Unfortunately, I have not the foggiest idea on where to start. I have been trying different ideas but all of them have failed so far.
Basically, I need the escort ships to despawn whenever the primary capital ship passes through a gate. The hardest part is making sure im despawning the correct escorts. My current attempt is focusing upon naming escort ships the exact same names as their parent ships, and adding an _escort1, _escort2, etc. etc. etc. at the end. Then, when the script is called to delete that random contact, it would also call deletion scripts for its escorts: function trigger_inside2portal_Action() --SLOG("Action done...."); local myTriggerContext = GetTriggerContext(); local flight = myTriggerContext:GetFlight(); flight ![]() local escort1 = flight.."_escort1" escort1 ![]() end; Only problem was, it spat out an error: [ScriptSystem] error: attempt to concat local `flight' (a table value) So the triggers use tables? Getting data out of it is going to be harder than I thought, it seems. |
#8
|
|||
|
|||
![]() Quote:
![]() |
#9
|
|||
|
|||
![]()
Thanks for the answer but I'm afraid this discussion will get us nowhere. Let's make it clear: You are generally right. The SW3 engine was changed but it can handle all functions the same way as previous SW2 engine.
|
#10
|
|||
|
|||
![]()
Your answer has encouraged me to check the whole thing. I've been thinking - IMPOSSIBLE?? I CAN DO IMPOSSIBLE
![]() Last edited by Goblin Wizard; 04-21-2010 at 08:41 PM. |
![]() |
Thread Tools | |
Display Modes | |
|
|