Author Topic: Invisible detection by script coded in tp2  (Read 1060 times)

Offline aigleborgne

  • Planewalker
  • *****
  • Posts: 106
Invisible detection by script coded in tp2
« on: February 21, 2006, 12:32:08 PM »
Hello,

I'm trying to add this special effect to some creature.
Here is my code:
   INSERT_BYTES "%fx_off%" 0x108 // inserting new prof effect
   WRITE_LONG ("%fx_off%" + 0x08) 193 // opcode
   WRITE_LONG ("%fx_off%" + 0x0c) 1 // myself
   WRITE_LONG ("%fx_off%" + 0x18) 1 // must be 1
   WRITE_LONG ("%fx_off%" + 0x1c) 9 // timing
   WRITE_SHORT ("%fx_off%" + 0x24) 100 // prob
(invisible detection by script)

Values are similar to another monster except some hex values.
Have someone successfully coded this in a tp2 file ?
I could probably do it by doing a copy from a working cre to another, but it is a tedious way. I'm looking for a simplier way, hoping that it exists :)

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Invisible detection by script coded in tp2
« Reply #1 on: February 22, 2006, 04:05:29 PM »
You need to increase the effect counts and make sure there is nothing after the effect blocks, if there is, you need to increase those offsets.

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Invisible detection by script coded in tp2
« Reply #2 on: February 23, 2006, 01:13:41 PM »
I was waiting for somebody else to say it, but...

You need to be a *lot* clearer. I know you know TP2, so what exactly doesn't work? Can the creature not detect invisible actors after the effect is added? Is the creature already in the saved game and your changes didn't take? (Creatures are attached to the area definition on load and stored in the saved game, so you need to start a new game or go to an unvisited area.) Does the invisible detection effect even work like it's supposed to?

Offline aigleborgne

  • Planewalker
  • *****
  • Posts: 106
Re: Invisible detection by script coded in tp2
« Reply #3 on: February 24, 2006, 10:47:57 AM »
I will be clearer :)

I have already had many effects to many NPC & monsters. So, this is not my problem. I know how to code them in my tp2.
I also know that there are 2 type of effects : small and large

All the effects I have coded work well.

My problem concerns the invisible detection by script.
This is a special effect because it need some hex value (look at some monsters like planetars).

My monster does have the effect, but the effect itself doesn't work and thus, it can't see invisible character.
The only way I know to do this is to copy this effect from a working creature. It's not the best solution, but it should work.

 

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)?: