Please ask your basic (newbie) questions in here. - by scumble
Tiens on 4/2/2007 at 02:54
Thanks again for your answers!
Quote Posted by Ziemanskye
You need to create flags yourself, rather than setting pre-existing properties...
I shall, I promise!!! But only after you tell me what do you mean under the word "FLAG"? Please, forgive my stupidity, but... is it a flag on the map near the book? Or is it any property that should be changed? And what shall I get after I "create flag myself"?:confused:
Quote Posted by Ziemanskye
As for going in an out of the volume...
I don't know - you could try putting the conditions for "When Volume breached..." on and see if that makes it work...
I did but nothing changes. I've got two volumes in one location. Volume 1 has condition "When Volume breached..." and volume 2 does not have it. Both telepot are OK. Both has the same bug. It looks like condition "When Volume breached..." has no effect.
Quote Posted by Ziemanskye
You might be able to just add that teleport Action to the _OnBook script and have it move the player directly without needing the volume at all.
No, it does not work. It was the reason I came to this forum! I tried to create a script like Cond. 'When I'm frobbed by player..." Act. "Teleport player to destination..."
I checked it today again - nothing good.
Best regards!
GlasWolf on 4/2/2007 at 03:30
Quote Posted by Tiens
But only after you tell me what do you mean under the word "FLAG"? Please, forgive my stupidity, but... is it a flag on the map near the book?
A flag is simply a boolean (true/false) global variable. You can manipulate them using the various (
http://www.ttlg.com/wiki/index.php?title=Scripting_conditions#Flags_and_Messages) script commands available. There are a bunch pre-defined for use in the original missions, but you're better off defining your own so a) you can give them your own descriptive names, and b) any pre-defined scripts won't mess with your flags by accident. You can define your own flags in the View menu --> Global Variables --> Flags. Once you've added your flag into the list it'll be available for use with the script conditions and actions linked above.
Regarding the other stuff, well like Z I see no reason why one script wouldn't work. One thing worth trying - I often use test actions to make sure my scripts are firing when they should be. I have a couple of text files called test1.sch and test2.sch containing simple "I'm working! 1" messages in my Books\English folder, and test scripts by adding an extra action:
Quote:
Flash non-blocking, formatted text from file [test1] and fade out after [2.00]
If the text appears when you frob the book then you at least know the script is running ok. This is particularly useful when messing around with volumes, as they have a tendency to simply not trigger on the "When I am breached by player..." type conditions. I seem to remember a frob condition not working for me once but I can't remember why - it was probably something stupid I was doing.
Tiens on 4/2/2007 at 04:22
Quote Posted by GlasWolf
A flag is simply a boolean (true/false) global variable...
Oh! THANK YOU VERY MUCH!!! I fogot about WIKI...
Quote Posted by GlasWolf
One thing worth trying - I often use test actions to make sure my scripts are firing when they should be... ...
Thanks! I'll try to do it now.
Ziemanskye on 4/2/2007 at 10:21
I think with the volumes you need it to be a deliberate AND type of Condition.
Er..
Logic: AND
--> If this message has been recieved...
--> When this volume is breached...
I think: this could be like the "Query if..." conditions that don't check right on their own accord, so need to be forced into co-operation with something else.
I know this is possible because I've done it, I just can't remeber how. :mad:
Tazonne on 4/2/2007 at 11:16
:thumb: thanks for the help folks. It works fine now. I would say that it was caused by some 'illegal' :ebil: brush operations. i'm clean as a saint now :angel:. And i'll remember these things...
Judith on 4/2/2007 at 18:40
Quote Posted by STiFU
Of course you always have to remember that flesh can't create two polys out of one, like every rendering tool would do if you vertice edit an object, which really sucks because it would be so easy to implement this "feature". But intersecting gets weird when it comes to complicated objects. Add a tube with 64 sides, then a cube, intersect it along the tube and I bet in 50% of the tries it will cause some serious errors, even if you use semisolids... :) So on complicated objects, either create a static mesh or cut it by yourself. You're always on the save side with static meshes. Some disadvantages are coming along with that too though, like you can't really edit the texture layout from within the editor. You can only apply others, but not the scale and stuff like that. (But you know that) :D
Ahh, you're right, I actually didn't think about something
that complicated :) I got used to making bsp brushes up to, let's say, 16 sides. Everything more complicated goes through 3dsmax. Automatic thinking - bad ;)
Tiens on 5/2/2007 at 01:44
Quote Posted by Ziemanskye
I think with the volumes you need it to be a deliberate AND type of Condition...
I'm so sorry, I did not mention it but I knew about Logical Conditions before. And I used
" Logic: AND
--> If this message has been recieved...
--> When this volume is breached..."
into script for Volume 2. But Volume 2 did the same things than Volume 1 did.
Please, forgive me for my questions!!! :angel:
(And do not kill me!:) )
Your advises were a real help.
Both Volumes are GOOD. Both teleports are OK.
But NOW I'M TRYING TO UNDERSTAND - why there is no difference?
I decided somebody could know this bug...
GlasWolf on 5/2/2007 at 02:17
Quote Posted by Tiens
I'm so sorry, I did not mention it but I knew about Logical Conditions before. And I used
" Logic: AND
--> If this message has been recieved...
--> When this volume is breached..."
into script for Volume 2. But Volume 2 did the same things than Volume 1 did.
I've sort of lost track on where you've got to - maybe you could post the exact scripts you're using now so we can check them over. However, what I
think Z is talking about are conditions that are only true at a specific instant, for example when the player breaches a volume. If you have an AND construct that involves two of these "instantaneous" conditions - for example a trigger message being received AND a volume being breached - then it will never fire because these two things will not be set true at exactly the same time. For example, if you have script conditions:
Code:
Logic [AND] operator
- When linked volume(s) [TriggerScript] are breached by [Category_Player]
- Received trigger message [SomeMessage]
Then it won't work. But if you use:
Code:
Logic [AND] operator
- When linked volume(s) [TriggerScript] are breached by [Category_Player]
- Query if flag [SomeFlag] is set to [TRUE]
Then that will be fine. Is that something like what you're doing? Is that even what everybody's talking about? :)
If your scripts are firing at the correct times then you can ignore all of this, as the problem must be with the actions rather than the conditions. Worth bearing in mind anyway. Note that Krypt explained this some time ago, and far more eloquently than I...
Ziemanskye on 5/2/2007 at 07:22
That's kind of what I was on about, and it did remind me of something else too: the order things are put into the the AND is important, cause if the first one fails it doesn't check the second (and if the first is a Query... it never checks the first :p)
So putting the "If Volume..." first might actually solve it. It's kind of weird like that.
Tiens on 5/2/2007 at 17:13
THANK YOU, people! REALLY THANK YOU! YOU HELPED ME A LOT!!! Now I get it. Let me explane.:angel:
I did not say that my book is INSIDE the volume. This volume is in the center of the room. Volume is unactive. When I touch the book I'm already inside the volume. For teleporting I have to come into the volume for TWO times: one to touch the book (then I must go OUT of the volume) and second to come again into the volume. It is not enough. The best is to come to the book, touch it and at the same moment teleport to a new room.
Here is my "homework".
First about your advises. Here are scripts I tryed:
1)
InvHammer_OnBook:
Cond.:
- Received trigger message [Hammer2]
- Query if oject [PLAYER] are within [128] unreal units from [MYSELF]
Act.:
- Send trigger message [TeleportBook01]
- Set 'Enabled' to [TRUE] for a volume pointed to by a trigger link named [TeleportBook01]
InvHammer_OnVolume:
Cond.:
Logic [AND] operator:
- Received trigger message [TeleportBook01]
- When linked volumes [MYSELF] are breached by [PLAYER]
Act.:
Teleport the object at end of [PLAYER] to Destination Teleport = [HHYard1]
2) for this script I created a flag "TeleportBookFlag" as GlasWolf told
InvHammer_OnBook_2:
Cond.:
- Received trigger message [Hammer2]
- Query if oject [PLAYER] are within [128] unreal units from [MYSELF]
Act.:
- Set flag [TeleportBookFlag] to [TRUE] expires on map change to [FALSE] expires on mission [20]
- Send trigger message [TeleportBook01]
- Set 'Enabled' to [TRUE] for a volume pointed to by a trigger link named [TeleportBook01]
InvHammer_OnVolume_2:
Cond.:
Logic [AND] operator:
- When linked volumes [MYSELF] are breached by [PLAYER]
- Query if flag [TeleportBookFlag] is set to [TRUE]
Act.:
Teleport the object at end of [PLAYER] to Destination Teleport = [HHYard1]
3)
InvHammer_OnBook_2:
Cond.:
- Received trigger message [Hammer2]
- Query if oject [PLAYER] are within [128] unreal units from [MYSELF]
Act.:
- Set flag [TeleportBookFlag] to [TRUE] expires on map change to [FALSE] expires on mission [20]
- Send trigger message [TeleportBook01]
- Set 'Enabled' to [TRUE] for a volume pointed to by a trigger link named [TeleportBook01]
InvHammer_OnVolume_3:
Cond.:
Logic [AND] operator:
- Query if flag [TeleportBookFlag] is set to [TRUE]
- Received trigger message [TeleportBook01]
Act.:
Teleport the object at end of [PLAYER] to Destination Teleport = [HHYard1]
4) here is my old try to teleport withough any volume:
InvHammer_OnBook_4:
Cond.:
- Received trigger message [Hammer2]
- Query if oject [PLAYER] are within [128] unreal units from [MYSELF]
Act.:
Teleport the object at the end of [PLAYER] to Destination Teleporter [HHYard1]
Scripts (1), (2) and (3) makes teleport volume enabled but I have to come into the volume twice.
Script (4) does not work at all :tsktsk: . Later I shall test it by GlasWolf's method...
AT THE END I HAVE SUCCEEDED!!! I got the way of teleporting I needed.
(5):idea:
InvHammer_OnBook_5:
Cond.:
- Received trigger message [Hammer2]
- Query if oject [PLAYER] are within [128] unreal units from [MYSELF]
Act.:
Teleport player to Destination Map [HauntedHouse1] Destination Teleporter [HHYard1]. Clear save maps? [FALSE]
This script lets Player touch Book with Hammer and... the next moment find himself into a new location!!!
THANK YOU AGAIN!!!