Jump to content

Pyranara

Members
  • Posts

    5
  • Joined

  • Last visited

Nexus Mods Profile

About Pyranara

Pyranara's Achievements

Rookie

Rookie (2/14)

0

Reputation

  1. Is there a removal equivalent of adding items to templates in the unrealscript? Something equivalent to Template.Abilities.AddItem('StunLance');would be nice. The reason I ask is because the default melee attack is applied from the weapon template to all items under the sword category, and in adding the stunlance as a weapon, that provides two different melee attacks. The stunlance is actually a baton in the game files, which is the standard enemy melee object. I could define this as a baton and attach the baton to the list of ranger weapons, but then that would require any other classmod that uses melee to do the same should they want to use it, which isn't really opportune for interoperability between addons.
  2. I'm trying to add in a perk or two that give EU style free item perks, like one free use of a flashbang per mission, or something like that, and frankly I can't quite figure out what to do. Anyone have any ideas? For now, I'm going to look over the specialist perks and see if the medkit one is any help.
  3. Probably not the help you want, but when searching for a specific enemy, you can use a command that's something like drop unit [template] [team] to drop a unit onto the time your mousecursor is at. So if you know the template of a unit with the sniper, then dropunit [template] 1 to make it an alien.
  4. Unfortunately, it's not that trivial. The FuseDamagePreview class just provides the preview when you mouse over the target, and doesn't have any impact on the actual usability of the skill. Grenades all have an ability called Fuse, which essentially just has a unit throw a grenade at itself without playing an animation. There's also an event listener, X2Action_Fire_IgniteFuse, which listens for the 'Template.PostActivationEvents.AddItem(default.FuseEventName);'. This script supposedly triggers fuse on the grenades, and this is where it seems to hang. I'll have a look into the animations suggestion when I have free time today. I found there were issue with the missing animation at first, but then I decided to just skip having any fire animation, and that issue disappears.For the time being, only X2Action_Fire_IgniteFuse and X2Action_WaitForWorldDamage hang, which are both events supposedly triggered by fuse. I believe that X2Action_Fire_IgniteFuse hangs waiting for X2Action_WaitForWorldDamage to respond, and when it inevitably hangs, it's already imparted the timeout to X2Action_Fire_IgniteFuse - It seems the scripts all have a 10 second timeout window. For reference, you can skip firing animations using Template.bSkipFireAction = true;
  5. I seem to have encountered a very troublesome error when activating the FuseEvent on custom abilities. Even just copypasting fuse ad verbatim from the psiop class causes these issues. I eventually narrowed it down to the specific event: Template.PostActivationEvents.AddItem(class'X2Ability_PsiOperativeAbilitySet'.default.FuseEventName);Which appears as : Template.PostActivationEvents.AddItem(default.FuseEventName);in the Psioperative file. Interestingly, this seems to function: however, on activation, there is a ~10 second delay before the action occurs, along with redscreens giving timeouts for X2Action_WaitForWorldDamage and X2Action_Fire_IgniteFuse classes. That's about as far as we could really get. It seems that the game is somehow waiting on phantom animations or performing some other black magic. Here's fuse, cut out to be modified for use as an ability by a custom class. It functions, but with a 10 second delay, and several red screens. Also, the actual explosion is invisible: static function X2AbilityTemplate Instability() { local X2AbilityTemplate Template; local X2AbilityCost_ActionPoints ActionPointCost; `CREATE_X2ABILITY_TEMPLATE(Template, 'Instability'); Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_fuse"; Template.AbilitySourceName = 'eAbilitySource_Psionic'; Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_MAJOR_PRIORITY; Template.Hostility = eHostility_Offensive; Template.bLimitTargetIcons = true; ActionPointCost = new class'X2AbilityCost_ActionPoints'; ActionPointCost.iNumPoints = 1; ActionPointCost.bConsumeAllPoints = true; Template.AbilityCosts.AddItem(ActionPointCost); Template.AbilityTriggers.AddItem(default.PlayerInputTrigger); Template.AbilityTargetStyle = default.SimpleSingleTarget; Template.AbilityToHitCalc = default.DeadEye; Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty); Template.AbilityTargetConditions.AddItem(default.GameplayVisibilityCondition); Template.AbilityTargetConditions.AddItem(new class'X2Condition_FuseTarget'); Template.AddShooterEffectExclusions(); Template.PostActivationEvents.AddItem(default.FuseEventName); Template.PostActivationEvents.AddItem(default.FusePostEventName); //Template.bShowActivation = true; //Template.CustomFireAnim = 'HL_Psi_SelfCast'; Template.bSkipFireAction = true; Template.BuildNewGameStateFn = TypicalAbility_BuildGameState; Template.BuildVisualizationFn = TypicalAbility_BuildVisualization; Template.TargetingMethod = class'X2TargetingMethod_Fuse'; //Template.CinescriptCameraType = "Psionic_FireAtUnit"; //Retain concealment when activating Fuse - then break it after the explosions have occurred. Template.ConcealmentRule = eConceal_Always; Template.AdditionalAbilities.AddItem('FusePostActivationConcealmentBreaker'); return Template; }Anyone have any ideas? I'm almost at my wit's end with this one.
×
×
  • Create New...