Page 1 of 1
Scripting in MOHRadiant... Possible?
Posted: Thu Apr 07, 2005 1:59 am
by ghsthunter23
ok is scripting in MOHR possible or do u have to use a regular script?
Posted: Thu Apr 07, 2005 6:53 am
by Grassy
AFIK it's NOT, for complex stuff... most use setthread keys to call a thread in the scr.
Grassy
Posted: Thu Apr 07, 2005 5:50 pm
by Deutsche Dogge
Grassy wrote:AFIK it's NOT, for complex stuff... most use setthread keys to call a thread in the scr.
Grassy
But, using setthread in the bsp foreces you to keep the name of the methods you are calling in the scr file, if you ever change it, the bsp won't find the code to execute.
Ideally, you set the targetname of an entity and use the script to set the thread to execute ($entity_targetname setthread thread_to_execute), more flexible imo, but it's a personnal choice.
Posted: Thu Apr 07, 2005 6:16 pm
by lizardkid
to put it simply, no. but Notepad comes with Windows so you can script anyway

Posted: Thu Apr 07, 2005 9:12 pm
by Grassy
Deutsche Dogge wrote:Grassy wrote:AFIK it's NOT, for complex stuff... most use setthread keys to call a thread in the scr.
Grassy
But, using setthread in the bsp foreces you to keep the name of the methods you are calling in the scr file, if you ever change it, the bsp won't find the code to execute.
What's in a name? The threads can be modified, just the name stays the same.. I don't have an issue with that.

Posted: Fri Apr 08, 2005 5:51 am
by Deutsche Dogge
Let's say you made a map a while ago and you decide to have a look at the script because you have time to waste, or for any reason, and find a method that is not called anywhere in the script, now you may say
damn, where did i used this code again? then it might take a while before you realize
oh, yeah, i set the thread in the bsp file or even decide to open the .map to look for an answer.
This is why i prefer using code rather than hardcoding it.

Posted: Fri Apr 08, 2005 8:34 am
by Bjarne BZR
Deutsche Dogge wrote:you may saydamn, where did i used this code again? then it might take a while before you realize oh, yeah, i set the thread in the bsp file or even decide to open the .map to look for an answer.
That is why you should put explanatory comments in your scripts

Posted: Fri Apr 08, 2005 10:21 pm
by Deutsche Dogge
Ok, i shut up.

Posted: Sat Apr 09, 2005 3:46 am
by lizardkid
i'd rather set the .scr apart and not have to recompile (especially with big maps) every time i make a change (say a $) as opposed to scripting with Rad.