![]() |
|
|
#1 |
|
Hi there,
how do i call the console command Say in a function i tried PlayerOwner().ConsoleCommand("Say") but it doesn't work and i tried to call Say("myvar"); and still doesn't work i've declared the variable in question as var localized string because it should contain text and i putted it into the default properties as follow: defaultproperties Code:
{
myvar="sometext"
}
thank you very much Best Regards FireFox- Last edited by Mychaeel; 7th Nov 2005 at 04:46 AM. |
|
|
|
|
|
|
#2 |
|
The Say console command is an exec function in the PlayerController class. Since you attempoted to use PlayerOwner(), I guess you are coding a GUIComponent class, so try: PlayerOwner().Say("text");
__________________
Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication (but were afraid to ask) [in German] | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
|
|
#3 |
|
i'm just tryin' to update the vehicle explosion function that should reside in the MyModGame (this is just an example of course because after i understood how to care with all the component in the function i will write my own function
and there aren't guicomponent declaration yet unfortunately ![]() i tried what you have wrote but didn't work ![]() any other suggestion? shall i write the function code? thank you very much Best Regards FireFox- Last edited by FireFox-; 7th Nov 2005 at 04:41 AM. |
|
|
|
|
|
|
#4 |
|
UnrealScript is an object-oriented language. You will have to know not only what you want to do (i.e. what objects/functions/variables to use), but also where (i.e. which class/object) you want to do it from.
__________________
Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication (but were afraid to ask) [in German] | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
|
|
#5 |
|
yes i know that UnrealScript is a object oriented language i noticed it by browsing the source code of ut2k4 and i noticed that everything is linked by class and or class reference in that way it makes the code to be more extended because if i extend a myown class to gameinfo for example
it means that i can use my own variables + the gameinfo's variable am i right? Last edited by FireFox-; 7th Nov 2005 at 05:04 AM. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|