Hmm since we have to use this now for the community project anyone have ideas on why the IP speaker wont die?
Float text on a non creature object
Débuté par
Eguintir Eligard
, janv. 06 2011 09:00
#26
Posté 26 février 2011 - 05:44
#27
Posté 27 février 2011 - 09:51
Are you using an IPoint rather than a 'real' creature? IPoints might not be killable.
#28
Posté 28 février 2011 - 12:43
nope, Ipoint. Stupid thing won't die no matter what I do.
Alternatively... yes I could use the same IP guy for the whole place. But each module the community makes will need this IP guy to be created.
Hmm... perhaps I can check if he exists at the start of each script call and create if not.
It's a little bothersome though that I can't have control of this creature, I've destroyed objects freely before.
Alternatively... yes I could use the same IP guy for the whole place. But each module the community makes will need this IP guy to be created.
Hmm... perhaps I can check if he exists at the start of each script call and create if not.
It's a little bothersome though that I can't have control of this creature, I've destroyed objects freely before.
#29
Posté 28 février 2011 - 01:49
Shouldn't this script be able to use the object itself and on an on use have it do a speakstring?
Granted the player will need to move to the object, but whatever. From across the room they will know it is a chest, once they get closer they can examine it and get a better description. This way if a trap is around something and the player thinks "that thing looks cool I want to go check it out", they need to use a bit of caution. If not they run over to it all excitied to find out about this interesting thing and set off an explosive trap, perfect!
You should be able to pull as local string from the object or even get the description from the object and do it as a speak string. I think a local string may be a bit better as any player could use the examine from anywhere and get the description, but this script would require the player to be near the object to examine it. This would open the door for other things as well. A second string could be applied to the object, "search_script" if that string wasn't empty it would fire that script in addition to the speak string and the player may learn some additional information or discover some hidden thing regarded to that object based on their skills.
Granted the player will need to move to the object, but whatever. From across the room they will know it is a chest, once they get closer they can examine it and get a better description. This way if a trap is around something and the player thinks "that thing looks cool I want to go check it out", they need to use a bit of caution. If not they run over to it all excitied to find out about this interesting thing and set off an explosive trap, perfect!
You should be able to pull as local string from the object or even get the description from the object and do it as a speak string. I think a local string may be a bit better as any player could use the examine from anywhere and get the description, but this script would require the player to be near the object to examine it. This would open the door for other things as well. A second string could be applied to the object, "search_script" if that string wasn't empty it would fire that script in addition to the speak string and the player may learn some additional information or discover some hidden thing regarded to that object based on their skills.
Modifié par Shaughn78, 28 février 2011 - 01:50 .
#30
Posté 28 février 2011 - 02:23
creature that is, not i point
#31
Posté 28 février 2011 - 02:25
I dont really know wha tyou are talking about. The whole point of the script is to work seamlessly like the Infinity engine.... example you click a painting from across the room the text comes up and your guy doesnt have to walk there #1, and #2 have to read the examine window.
#32
Posté 28 février 2011 - 04:34
Since when has the Infinity engine worked seamlessly?
Modifié par DannJ, 28 février 2011 - 04:34 .
#33
Posté 28 février 2011 - 04:39
I think you need to show your latest code. I've had success creating a script for OnLeftClick that spawns a (visible, for testing) creature that retrieves a line from the placeable, speaks it, and is destroyed a few seconds later.
A different approach would be to hack the examine GUI so that it doesn't actually display a GUI at all, but instead calls a script that does what you're trying to do. This would mean that the text pops up when you click on Examine as opposed to when you left click.
However, I'd caution you about doing anything that requires a player to read description text as you're talking about, with no other options. I understand your desire for more immersion (rather than separate windows) and I support builders' ability to choose the option they like. From a readibility perspective, though, I'd personally find this very difficult and would likely give up reading descriptions. The way floating text/one-liners are displayed is quite difficult for me to read if it's more than a shortish-sentence, which means that I often end up reading it in the log. If events in game start to fly fast and furious, reading long lines out of the log is also...not ideal.
A compromise might be to get a GUI system working as you would like it to work--including no Examine screen (visibily) popping up at all, but a sentence being spoken to the PC--and then offer it as an option for people playing that content. I generally feel that, although GUI override systems can be tied to a specific adventure, that kind of thing should always be up to the player to use or not.
A different approach would be to hack the examine GUI so that it doesn't actually display a GUI at all, but instead calls a script that does what you're trying to do. This would mean that the text pops up when you click on Examine as opposed to when you left click.
However, I'd caution you about doing anything that requires a player to read description text as you're talking about, with no other options. I understand your desire for more immersion (rather than separate windows) and I support builders' ability to choose the option they like. From a readibility perspective, though, I'd personally find this very difficult and would likely give up reading descriptions. The way floating text/one-liners are displayed is quite difficult for me to read if it's more than a shortish-sentence, which means that I often end up reading it in the log. If events in game start to fly fast and furious, reading long lines out of the log is also...not ideal.
A compromise might be to get a GUI system working as you would like it to work--including no Examine screen (visibily) popping up at all, but a sentence being spoken to the PC--and then offer it as an option for people playing that content. I generally feel that, although GUI override systems can be tied to a specific adventure, that kind of thing should always be up to the player to use or not.
#34
Posté 28 février 2011 - 03:35
if people want to examine in a butt ugly 7 year old GUI window they can right click it.
#35
Posté 03 mars 2011 - 02:38
Perhaps not 100% ideal but here's an approach.
Placeable: Conversation "conv"; Description "*"; Useable TRUE; Default action Automatic; On Left Click "script1", string variable "sSay" with what you want for the floating text.
script1:
void main()
{
ExecuteScript("tokens",OBJECT_SELF);
ActionStartConversation(GetPlaceableLastClickedBy());
}
script "tokens" (so you don't have to create a conversation for every placeable!)
void main()
{
object oSelf = OBJECT_SELF;
string sWords = GetLocalString(oSelf,"sSay");
SetCustomToken(100,sWords);
}
Conversation "conv"
Single node
<CUSTOM100>
From a distance you click the placeable and floating text appears with |*| [Whatever you had as the string variable sSay]. One conversation, two short scripts. Only downside is the |*| at the beginning of the floating string.
Placeable: Conversation "conv"; Description "*"; Useable TRUE; Default action Automatic; On Left Click "script1", string variable "sSay" with what you want for the floating text.
script1:
void main()
{
ExecuteScript("tokens",OBJECT_SELF);
ActionStartConversation(GetPlaceableLastClickedBy());
}
script "tokens" (so you don't have to create a conversation for every placeable!)
void main()
{
object oSelf = OBJECT_SELF;
string sWords = GetLocalString(oSelf,"sSay");
SetCustomToken(100,sWords);
}
Conversation "conv"
Single node
<CUSTOM100>
From a distance you click the placeable and floating text appears with |*| [Whatever you had as the string variable sSay]. One conversation, two short scripts. Only downside is the |*| at the beginning of the floating string.
#36
Posté 03 mars 2011 - 07:46
Interesting approach. The thing I wasn't able to accomplish was not to have the PC start to run towards the placeable to use it when you clicked on it, even though the SpeakString on the speaker would start fine. So I clicked on it, saw the string, then hit a WASD key to stop my char running.





Retour en haut







