View Full Version : GeneratedEvents[]
mikepurvis
04-09-2008, 12:40 AM
Hello:
I'm working with extending SequenceEvent and am having difficulty finding out where I can call it's CheckActivate function to fire off an event.
CheckActivate seems to require a GeneratedEvents[] array. At run time this is always empty from the player controller so the CheckActivate fails.
I tried spawning an info actor and calling it from there but it's GeneratedEvents was also empty.
Any help would be appreciated.
immortius
04-09-2008, 09:16 AM
The idea with CheckActivate is that the calling function will make an int array with size equal to the number of events it wishes to activate, fill the array with the indices of the events it wants to activate and then use that as the parameter for the CheckActivate funciton. i.e.
function VolumeCaptured(Pawn Captor) {
local array<int> ActivateIndices;
ActivateIndices[0] = 1; //Where 1 is the output link to activate
CheckActivate(Originator, Captor, false, ActivateIndices);
}
You may fine this thread helpful:
http://utforums.epicgames.com/showpost.php?p=25256283
mikepurvis
04-10-2008, 05:02 PM
Hi:
Thanks fo rthe reply. I looked at the code on the link and I'm still having the same problem. Its the GeneratedEvents property.
How can I initiailize or add an event to this, because its always empty when I call it.
I am trying to call the event from my Player Controller.
immortius
04-11-2008, 04:39 AM
Ah, you're after a list of events to call CheckActivate on.
GenerateEvents[] is populated by the UT3 editor when you attach an actor to an event. It won't be any use to you in this case. What you'll want to do is get the events from elsewhere.
WorldInfo has a function GetGameSequence(), that returns the base Sequence object that contains all the map's sequences. You can use the FindSeqObjectsByClass() function in this sequence to get an array of the events you are interested in. Then iterate over that calling CheckActivate().
mikepurvis
04-11-2008, 03:07 PM
Thank you:
I had been fighting with this for a few weeks. I now have a working event that can be wired up in Kismet which can be activated by the PlayerController.
wwwRAELorg
08-20-2009, 01:20 PM
Ah, you're after a list of events to call CheckActivate on.
GenerateEvents[] is populated by the UT3 editor when you attach an actor to an event. It won't be any use to you in this case. What you'll want to do is get the events from elsewhere.
WorldInfo has a function GetGameSequence(), that returns the base Sequence object that contains all the map's sequences. You can use the FindSeqObjectsByClass() function in this sequence to get an array of the events you are interested in. Then iterate over that calling CheckActivate().
How do you implement this in code?
Wormbo
08-20-2009, 05:12 PM
Have a look at the GameInfo source, it does activate some level events and should be a useful example for implementing custom events. Another way of doing it is the Actor.TakeDamage() function, which uses the GeneratedEvents array directly.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.