| 05-16-2007, 12:39 AM | #2 |
Why not display text to player rather than force? Trigger: Game - Display to (Triggering player), at offset (0.00, 0.00) the text: No Item 4 youPlayers don't leak, undestroyed forces do, and I believe displaytexttoforce needs to have the force destroyed after as the function doesn't do it. SO rather than mess with that, lets just skip it and use Display Text to Player. |
| 05-16-2007, 12:44 AM | #3 |
is there a trigger like this ? as i can see there isn´t |
| 05-16-2007, 12:49 AM | #4 |
Trigger: Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: TextEdit: Rofl, Hobo just edited. Well, he got it wrong though. |
| 05-16-2007, 12:50 AM | #5 |
Go to New Action, then Pick Game as action type, the first option is display text to player and it defaults to triggering player. nice eh? If you want to get really fancy put the message between these letters |cffffcc00 --here-- |r should look like this : |cffffcc00This message is error yellow|r you can also set the offset to the center of the screen but different resolutions move it around so its not exactally worth it. |
| 05-16-2007, 12:52 AM | #6 |
Yeah, but is it the player that does the triggering? (answer: no) |
| 05-16-2007, 12:55 AM | #7 |
well it is not that easy for me, take a look at the iamge, it isnt the first one. and ill try the new action you posted, but should i rvome the variables ? |
| 05-16-2007, 12:57 AM | #8 |
Jester The GetTriggerPlayer() Jass Function Returns a variable that is set when an event triggers. In a unitissuedorder event GetTriggerPlayer() is set to OwnerofUnit(GetTriggerUnit()) already. EDIT: aww damn sorry about that Darth... http://www.wc3campaigns.net/showthread.php?t=90999 Download a real worldeditor I'm using a jassnewgen3 hacked UMSWE 4.1. Heres a custom script call for it call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "|cffffcc00Replace this with your error message|r" ) |
| 05-16-2007, 01:00 AM | #9 |
i didn´t unterstand a thing, only JASS, that i´m not good. |
| 05-16-2007, 01:02 AM | #10 |
I'm pretty sure that it doesn't work since I've had trouble with it before. I'll test this now. Edit: it actually works, pretty sweet. |
| 05-16-2007, 01:08 AM | #11 |
Trigger: Jester: IT works for most events but not all, should work for all unit events. Heck yeah it's sweet, Since I switched to JASS I've learned the awesomest shorcuts! |
| 05-16-2007, 01:10 AM | #12 | |
Quote:
yeah, it works. thanks and +rep for you. thanks too hobo, but actually you didn´t made me fix it, keep helping people. |
| 05-16-2007, 01:14 AM | #13 |
NO NO NO NO The problem is DisplaytoPlayer instead of DisplaytoPlayerGROUP see the group? Its bad bad bad! No group! just one player. Display to player group like that creates a group then sends a message to it but it doesn't destroy the group! That means it leaks..... thats bad. Display to player doesn't leak... Get it yet? Trigger: custom script: call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "|cffffcc00Replace this with your error message|r" )is what you want.... I promise ![]() --------------------------------------------------------------- On another note you tried to removelocation on your playergroup in the original trigger which makes no sense you wanted : Trigger: custom script: call DestroyForce(udg_PlayerOwnerOfScepter)But lets display text to a single player instead of a player group (which is actually called a force) as much as possible. Better that way! |
| 05-16-2007, 01:23 AM | #14 | |
Quote:
that leaks ???? O NOOOOOOOOOOOOOOOOOO -REP -REP -REP ( kiddng) !!!!! and does your trigger work hobo, but where can i see where all the custom script funcions are ? why don´t blizz make a normal "selectionable" with them ?? and by the way, cya tomorrow, sleeping now... late here in Brazil. |
| 05-16-2007, 01:28 AM | #15 |
I believe hobo is correct. Leaks are bad, avoid them like the plague. Besides, it seems more logical to display it to the person who picked, or attempted to pick up the item rather than the whole team. Blizz made a list of some of the functions, this is called GUI. It is what you are using now. I would hardly call GUI "normal", it is the least like programming I have seen that is still remotely like it. JASS is programming. But you can see all, or most of them in various places. I look in JassCraft to find some, but JassCraft is, and has been for some time, obsolete. |
