Author Topic: Another 'dumb' question re backpack items  (Read 1134 times)

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Another 'dumb' question re backpack items
« on: July 01, 2005, 05:57:34 PM »
Guys and gals, can you all give me a hint as to how I would envoke something like Daystar's light ability which destroys wraiths and such?  I know how to code wizard spells, innate spells, but I'm not sure how you code stuff associated with items in your inventory so it goes off via scripting when one encounters enemies.

Thanks all and have a happy holdiay!  Don't work too hard!

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Another 'dumb' question re backpack items
« Reply #1 on: July 01, 2005, 06:38:06 PM »
I can't help you craft the spell (although certainly, looking at Daystar's usable effects would be a great start!) but do you mean you just want the bad guys to go poof even if the item isn't equipped or activated?

In that case, you might consider putting some sort of code like this in the _creature's_ script:

IF
PartyHasItem("TheKillingMeItem")
THEN
RESPONSE #100
DestroySelfInAnInterestingMannerMaybeWithTheFlashyDeathYeahSpellOrSomething()
END
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another 'dumb' question re backpack items
« Reply #2 on: July 02, 2005, 05:36:10 AM »
That's pretty much it.  I want to activate DayStar's ability via script in certain situations rather than having to cllick on the backpack icon and manully do it.

Thanks

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Another 'dumb' question re backpack items
« Reply #3 on: July 02, 2005, 02:13:22 PM »
My simplistic method wouldn't actually decrement Daystar's times-per-day counter, and of course you'd probably want to work in something so that the bad guys were in range of the Daystar wielder, etc. etc. But, yeah, in lieu of better advice from somebody who knows what they're talking about, I would suggest putting the relevant "kill-me" scripting bit into the enemy AI in question, presuming that the baddies you want to destroy have an AI specific to their creature type. If not, you may need to patch or assign a new override script.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Idobek

  • Dust Bunny
  • Planewalker
  • *****
  • Posts: 431
  • Gender: Male
Re: Another 'dumb' question re backpack items
« Reply #4 on: July 02, 2005, 02:48:23 PM »
You might want to experiment with SelectWeaponAbility(I:WeaponNum*Slots,I:AbilityNum*).
The Gibberlings Three Forums

<SimDing0> Did you know G3 has secret forum rules?
<CamDawg> Yep. They're generally of the nature 'don't annoy Idobek.'

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another 'dumb' question re backpack items
« Reply #5 on: July 03, 2005, 07:08:19 AM »
I decompiled GMAGE.BS from the gSeries to see how they invoked the ability of the Girdle of Fortitude and it appears that they do a simple check to see if you have the spell and then proceed from there.  So I guess I can do a check for baddies within range and a check for the spell 'Sunray' and if I haven't drained the item just simply cast it.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: