Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2012, 08:32 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default Destroy (delete) earlier spawned actor

I have a problem that I'm hoping some fresh brains can offer a solution for. The pseudocode is as follows:

a. When an AiAircraft actor is created I want to test to see if there is a previous version of the same actor (aircraft).

b. If a previous (ealier spawned) version exists, then I want to delete (remove) the earlier AiAircraft from the battle.

Options:
1. I tried using actor.tag to hold the spawn time of the actor but this keeps throwing null errors after deleting actors.
2. Log spawning times of actors? Clunky?
3. get mission number of an actor & look for lower mission number?
4. other methods?

Below some non-working code:

code removed by author
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE

Last edited by salmo; 10-18-2012 at 09:23 AM.
Reply With Quote
  #2  
Old 08-13-2012, 02:54 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

My initial thought is that there is no association between the about to spawn aircraft and old aircraft even though they possibly are the same type.

Many solutions probably.
I'd attempt,
Store the onactorcreated mission number, shortname and actor to a list, then test the list against play for true/false if they are alive or landed and then if alive destroy.

You are trying to test the about to spawn against those ingame, they are different so always false.

Also if you have a list, you could look for how many left and spawn in replacements of the missing or landed.

Last edited by Smokeynz; 08-13-2012 at 03:00 AM.
Reply With Quote
  #3  
Old 08-13-2012, 03:21 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

oh with the list you would probably need to add a spawn number or name to associate it with a specific trigger event, what ever it is.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.