Scripting in MOHRadiant... Possible?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
ghsthunter23
Private
Posts: 7
Joined: Thu Apr 07, 2005 1:56 am
Location: Jo mama

Scripting in MOHRadiant... Possible?

Post by ghsthunter23 »

ok is scripting in MOHR possible or do u have to use a regular script?
Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

AFIK it's NOT, for complex stuff... most use setthread keys to call a thread in the scr.
Grassy
An ambiguous question will get a similar answer...
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post 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.
Image
Click sig to visit the alternation modding community
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

to put it simply, no. but Notepad comes with Windows so you can script anyway ;)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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. :)
An ambiguous question will get a similar answer...
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post 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 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.

This is why i prefer using code rather than hardcoding it. :)
Image
Click sig to visit the alternation modding community
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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 ;)
Admin .MAP Forums
Image
Head above heels.
User avatar
Deutsche Dogge
First Lieutenant
Posts: 183
Joined: Wed May 07, 2003 11:50 pm
Location: Quebec
Contact:

Post by Deutsche Dogge »

Ok, i shut up.








:lol:
Image
Click sig to visit the alternation modding community
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply