Jump to content

Search the Community

Showing results for tags 'event'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Kotor Modding
    • Mod Releases
    • General Kotor/TSL Modding
    • Modding Tools
    • Work In Progress
    • Tutorials
    • Game Saves
  • Mod Projects
    • TSLRCM
    • M4-78 Enhancement Project
    • KotOR1 Restoration (K1R)
    • Revenge of Revan
    • KotOR Toolset
  • Jedi Knight Series
    • General Discussion
    • Mod Releases
  • Other Games
    • Other Games
    • Dantooine Theater Company
  • General
    • News
    • Knights of the Old Republic General
    • Star Wars
    • The Old Republic
    • Site Feedback
    • General Discussion

Blogs

  • Blog 1
  • The memories of Mandalore
  • Blog 63
  • Varsity Puppet's Brain Dump
  • Working Class Hero's Blog
  • mmidnight's Blog
  • Blog-Tastika
  • Darth Malious' Blog
  • The Beta Community's Voice
  • sallyrit's Blog
  • Sith Holocron's Blog
  • Diablo3gold
  • Marginalia
  • Mindwizard's Blog
  • Journal Log Of Penally's Bounties
  • Mudslinger077's Blog
  • starwars1234's Blog
  • Blaaargh.2da
  • Kate The Bionic Uterus' Vibrating Submarine
  • Darth Nuge's Blog
  • The Xuul Report
  • KOTOR Fan Theories
  • Benny Chan style
  • Darth_Sapiens' Blog
  • Neville's Blog
  • Darth_Sapiens' Blog
  • TimmyDean's Blog
  • Malkior's Blog
  • DarthSidious4.2's Blog
  • Darth Pravus' Blog
  • Help
  • Canderis' Blog
  • The Musings of Eauxps
  • xander2077's Blog
  • DeadMan's chest
  • pepoluan Far Far Away
  • Rece's Videos
  • jc2's Journal
  • Kexikus' Blog
  • Kreia's Blog
  • Fair Strides' Blog
  • Pazuzu156's Blog
  • GoldLeader's Blog
  • Steira Shipyards
  • lyuscherbakova1986's Blog
  • superSzym's Blog
  • Leilukin's Blog
  • N-DReW's Datapad
  • magdahalo's Blog
  • Trouble Successfully Using Kotor II TSLRCM 1.8.5 On Windows 7 x64-Bit Laptop
  • DarthTyren's Blog
  • The Holocron of Darth Kyber
  • Darth Varkor's KOTOR Machinima Saga: Production Blog
  • ADG12311990's Blog
  • Unusual's VA Blog
  • Draconian's TSL mod request.
  • darthbdaman's Holocron
  • JC's Blog
  • L0ki's Blog of questions & brief WIP things
  • The Iriaz Archives
  • Breakfast With eb
  • Cathar Handmaiden Skin?
  • Kast's Datapad
  • Having fun with the KotOR maps.
  • AndroidKotOR Modded
  • Starıka's Jedi Academy Machinimas
  • KotOR II Damage Calculator
  • Help Modding
  • A step-by-step guide for widescreen in Star Wars: Knights of the Old Republic
  • 13 gigabytes, 13 brain cells
  • Modding Tools
  • StellarExile Mod Stuff
  • Jedi Knight: Jedi Academy films by Cor
  • Something of a moment of truth
  • Music for Streams
  • LoneWanderer's blog
  • modder 9's blog
  • Community Requests
  • Kotor combined saga blog
  • My Kotor Machinimas
  • How do you stream with your Widescreen fixes?
  • Looking for advice to solve a challenging bug: Eastern Dune Sea is resetting every time upon entering

Categories

  • Knights of The Old Republic
    • Media
    • Mods
    • Skins
    • Modder's Resources
  • The Sith Lords
    • Media
    • Mods
    • Skins
    • Modder's Resources
  • Jedi Knight Series
    • Maps
    • Mods
    • Skins
    • Other
  • Game Saves
  • Other Games
  • Modding Tools

Product Groups

  • Premium Membership
  • Modders Account

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. One of the things I would like to do for a mod I'm working on is have non-droid units use special weapons like the flamethrower and carbonite emitter. The first problem with this, as far as I can see, is that when it comes to targeting enemies human characters use force powers in the spot where droids use item spells. So I've created a flamethrower item that can be equipped by both humans and droids but only one of them can use it to target enemies. There are some ways around this. I looked at a mod that implemented a flamethrower for human characters. Instead of targeting an enemy, the flamethrower would targeting the user like an energy shield. Then the script that resolves the spell finds an enemy near the user to fire the flamethrower. This is pretty clever, but I don't like it as a solution because you can't choose who to target. So I had another idea. I would simply create a force power called "Use Item". The power would activate a script that would find the item equipped on the armband and then activate it. This is where I'm having some trouble. I've created the following script and hooked up everything so it runs, but it doesn't activate the item. //:: k_sup_useitem // Custom script by Box // This is a script for using a custom weapon from a spell // This could be considerably more tricky #include "k_inc_debug" void main() { object oItem; // The item to use int nInventorySlot; // The inventory slot where we're keeping the item event evItem; // Event for activating item? object oTarget; // Item target location lTarget; // Item target location // Get the item we're trying to activate // This seems pretty simple so I imagine it works nInventorySlot = INVENTORY_SLOT_LEFTARM; oItem = GetItemInSlot(nInventorySlot, OBJECT_SELF); // Activate the item obtained // Not sure exactly what is going on here with "events" oTarget = GetSpellTargetObject(); lTarget = GetSpellTargetLocation(); evItem = EventActivateItem(oItem, lTarget, oTarget); // I'm guessing this is what we need to run next // If the last block returned an event for activating an item, this should perform the event and activate the item, right? SignalEvent(OBJECT_SELF, evItem); } I've never written a script like this using "events" before. I just found functions in the documentation that seemed like they would do what I wanted. Unfortunately while I can verify that the script is called, it doesn't actually activate the item. I don't know if there are only certain items that can be activated. Most consumable items seem similar in their .uti files with a property that determines what spell is cast when the item is used. I was assuming that an event activating an item would work similarly, but I can't even get this to activate a regular energy shield. On the other hand, I've considered a completely different approach. Instead of trying to activate the item from a script, I would instead just determine the identity of the item equipped and then perform the effect of the item right in this script. There's a problem with that though. I've been using weapons and energy shields with a cooldown effect, so instead of having 5-10 uses before disappearing, they have unlimited uses but can only but have to wait 60 seconds before being used again. If I bypass actually activating the item with this script, then I need to figure out a way to implement a cooldown system. I have no experience doing anything like that. I assume it would probably involve global variables and heartbeat scripts but I don't know where to start. So that's my situation. I think it's a pretty interesting problem and it would be really cool if we could figure it out. What do you guys think? Does anyone know how in-script item activation or cooldowns work? Or maybe you guys have a different way of looking at this problem.
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines.