Aller au contenu

Photo

EVENT_TYPE_CLICK problem


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Questore

Questore
  • Members
  • 3 messages
Hi guys!

I've tried to make a simple scripting that shows a simple message in the game when clicking on anything!
I've associated it with an area, but it seems that EVENT_TYPE_CLICK does nothing. Does it even fire at all?
What did i do wrong?
 
 case EVENT_TYPE_CLICK:
         {
            DisplayFloatyMessage(GetEventTarget(ev), "This is a message", FLOATY_MESSAGE, 8777215, 2.0)

            break;
         }

#2
Proleric

Proleric
  • Members
  • 2 354 messages
That's a placeable event, so it needs to go in your placeable script.

#3
FergusM

FergusM
  • Members
  • 460 messages
Yes, it's not for clicking on everything. I think raw input (e.g. what keys does the player press) is not something you're going to have access to in the scripting system.

#4
Questore

Questore
  • Members
  • 3 messages

Proleric1 wrote...

That's a placeable event, so it needs to go in your placeable script.


THX, how do I know which event are for objects which are for placeables or which are for creatures etc?

Another question. How do i solve the first problem? Example I have a man and i want to create a floating message when i click on him: "He appears to be speechless" ?

#5
FergusM

FergusM
  • Members
  • 460 messages
What you want to do for that is have an ambient conversation. Basically, create a conversation and find/check the 'ambient line' box. Then give this conversation to the creature. When you click on him to initiate conversation, if his lines are ambient they will just appear above his head rather than launching a full conversation.



About events: it isn't always clearly documented how events are used; looking through Bioware's scripts will give you an idea after a while of what is used where. It can be educational to just look through things like creature_core, rules_core, placeables_core, etc. to see how various events are used. Another way is to look at events_h, which does have some comments about some events.

#6
Questore

Questore
  • Members
  • 3 messages

FergusM wrote...

What you want to do for that is have an ambient conversation. Basically, create a conversation and find/check the 'ambient line' box. Then give this conversation to the creature. When you click on him to initiate conversation, if his lines are ambient they will just appear above his head rather than launching a full conversation.

About events: it isn't always clearly documented how events are used; looking through Bioware's scripts will give you an idea after a while of what is used where. It can be educational to just look through things like creature_core, rules_core, placeables_core, etc. to see how various events are used. Another way is to look at events_h, which does have some comments about some events.


BIG THANKS. I think these will help.

#7
Proleric

Proleric
  • Members
  • 2 354 messages
Here's a categorised list of events.

Modifié par Proleric1, 09 août 2010 - 06:03 .