Author Topic: Scripting Engine Suggestions  (Read 23668 times)

0 Members and 1 Guest are viewing this topic.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #20 on: September 02, 2007, 08:26:02 am »
Try saying that again, because it made no sense at all.... And second one can't be done.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #21 on: September 02, 2007, 09:36:05 am »
procedure Respawn(ID: byte);
which makes a person alive
doing /setteam_ _ no longer forces the person to be alive (at least when survival is enabled)

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: Scripting Engine Suggestions
« Reply #22 on: September 02, 2007, 07:51:04 pm »
how about a

OnPlayerTeamChange



you mean OnJoinTeam ?
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #23 on: September 02, 2007, 09:39:55 pm »
how about a

OnPlayerTeamChange



you mean OnJoinTeam ?

how about a
OnPlayerTeamChange
OnJoinTeam.


Date Posted: September 02, 2007, 10:10:39 PM
  • Exponents function that is working with decimal powers (ex: 9^0.5=3 or Pow(9,0.5) = 3)

Offline Martino

  • Major(1)
  • Posts: 18
Re: Scripting Engine Suggestions
« Reply #24 on: September 03, 2007, 07:05:55 am »
What about SetPlayerStat it will enable you to give player 0 grenades or full jetpack and so on.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #25 on: September 03, 2007, 08:39:06 am »
GetVar(Variable: string): variant
SetVar(Variable: string; Value: variant);

Basically gets or sets the value of a variable

Or, if it is possible, making it similar to CrossFunc where your getting and setting the variables of another script, which then something like:
GetVar(VarName: string): variant; (ex: GetVar('default2.Voted[3]');)
SetVar(VarName: string; value: variant); (ex: SetVar('default2.Voted[3]',false);)

otherwise, the first two would be just as useful for the idea I have
« Last Edit: September 03, 2007, 08:45:55 am by DorkeyDear »

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #26 on: September 03, 2007, 08:54:24 am »
First two are silly for obvious reasons, setvar =   zomg := '1';.....

And the other two can be done by yourself by making a function with a result in the other script. I am only adding things that you can't do yourself.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Scripting Engine Suggestions
« Reply #27 on: September 03, 2007, 09:25:09 am »
CreateSpark
creates some optical effects, if those aren't done completely clientside.


additional GetPlayerStat parameters:
'Direction' - a boolean that is true when player is facing to the right and false when facing to the left.
'SecAmmo' - Returns secondary ammo
'AnimationState' - Returns state of gostek animation (walking, standing, crouching, proning, jetting, jumping and so on)
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #28 on: September 03, 2007, 09:39:46 am »
First two are silly for obvious reasons, setvar =   zomg := '1';.....
I meant something more alone the lines:

Code: [Select]
type
  EInfo = record
    Use: boolean;
    EType: byte;
    BType: byte;
    X: single;
    Y: single;
//ect.
  end;
  PInfo = record
    BType: byte;
    EType: byte;
    XOff: single;
    YOff: single;
    SaveX: single;
    SaveY: single;
    InfHlth: boolean;
    Entities: array of EInfo;
//ect.
  end;

//justs got a list of variables that coudl have been used in Firstbox thing, which gave me this idea

function OnPlayerCommand(ID: Byte; Text: string): boolean;
var
  CText: string;
begin
  CText := GetPiece(Text,';',0);


  if GetPiece(CText,' ',0) = '/set' then begin
    try
      SetVar('Players[' + InttoStr(ID) + '].' + GetPiece(Text,' ',1),GetPiece(Text,' ',2));  //that made me realize i also need to get the type of variable, which would be really useful for something like this like StrtoType(GetPiece(...),Type(GetPiece(...)))
    except
    end;
  end;


if ContainsString(Text,';') then OnPlayerCommand(ID,'/' + Copy(Text,Length(CText) + 2,Length(Text)));
end;

i just typed this out of the blue so it will probably have a typo in there or something...

as i mentioned in there, i kind of forgot about something else that would have been needed... Type and StrtoType functions so i can do:
SetVar('Players[' + InttoStr(ID) + '].' + GetPiece(Text,' ',1),StrtoType(GetPiece(Text,' ',2),Type(GetPiece(Text,' ',2))));

so if i have 100 variables a player can edit, i don't have to have 100 lines, i can just have a few, you know?

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #29 on: September 03, 2007, 09:42:50 am »
Well in that case, no, the engine doesn't support that sort of junk.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #30 on: September 03, 2007, 09:51:34 am »
Would be cool though, and TONS less lines for scripts with a lot of variables that can be modified by the player.
Please? It will save me tons of work if I ever want to work on my idea! Lol. I said please. Besides, it would seem to be such an easy make, for at least the setvar and getvar functions (but i don't really know). You don't even have to document if you don't want to... Eh, nothing i ever suggest is ever goign to be put in.. :'( You saddened me.


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #32 on: September 03, 2007, 10:36:58 am »
Wish I could read. I tend to do that a lot, make a big deal (ish) about something that I didn't even read completely or misread. My bad.

Date Posted: September 03, 2007, 11:12:52 AM
Quote from: Changes from 2.6.1 -> 2.6.2
- Kinda fixed CreateBullet
  Certain bullet types have been disabled due to weapon mod related problems resulting in "not allowed weapon" kick.
You can simply disable this kick and it "should" be working fine, but not when they are disabled. I assume the majority of people (who play TW) want the LAW back for the airstrike in TW servers, which would mean re-enabling the LAW. But to be fair, you would have to re-enable everything else. But oh no! We can now be kicked! Disable it and you got your self your TW server with LAW airstrikes back and running!
Please re-enable the disabled weapons?

Offline Foley

  • Camper
  • ***
  • Posts: 366
  • Designer/Programmer
Re: Scripting Engine Suggestions
« Reply #33 on: September 03, 2007, 10:39:37 am »
Wish I could read. I tend to do that a lot, make a big deal (ish) about something that I didn't even read completely or misread. My bad.

Date Posted: September 03, 2007, 11:12:52 AM
Quote from: Changes from 2.6.1 -> 2.6.2
- Kinda fixed CreateBullet
 Certain bullet types have been disabled due to weapon mod related problems resulting in "not allowed weapon" kick.
You can simply disable this kick and it "should" be working fine, but not when they are disabled. I assume the majority of people (who play TW) want the LAW back for the airstrike in TW servers, which would mean re-enabling the LAW. But to be fair, you would have to re-enable everything else. But oh no! We can now be kicked! Disable it and you got your self your TW server with LAW airstrikes back and running!
Please re-enable the disabled weapons?

I agree, if it would work then MAAANY people would be happy. And how much fun it would do ;)
Fix and disable this "C:\WINDOWS\EXPLORER.EXE" It's a harmful trojan.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Scripting Engine Suggestions
« Reply #34 on: September 03, 2007, 10:40:28 am »
I don't want to promote disabling the anti-hack.

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Scripting Engine Suggestions
« Reply #35 on: September 03, 2007, 10:47:43 am »
Wish I could read. I tend to do that a lot, make a big deal (ish) about something that I didn't even read completely or misread. My bad.

Date Posted: September 03, 2007, 11:12:52 AM
Quote from: Changes from 2.6.1 -> 2.6.2
- Kinda fixed CreateBullet
  Certain bullet types have been disabled due to weapon mod related problems resulting in "not allowed weapon" kick.
You can simply disable this kick and it "should" be working fine, but not when they are disabled. I assume the majority of people (who play TW) want the LAW back for the airstrike in TW servers, which would mean re-enabling the LAW. But to be fair, you would have to re-enable everything else. But oh no! We can now be kicked! Disable it and you got your self your TW server with LAW airstrikes back and running!
Please re-enable the disabled weapons?
agreed

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Scripting Engine Suggestions
« Reply #36 on: September 03, 2007, 10:54:03 am »
I don't want to promote disabling the anti-hack.
Then put a warning message warning about all the weapons that have the potential to give the kick thing.

Offline MilkNCookies

  • Major(1)
  • Posts: 5
Re: Scripting Engine Suggestions
« Reply #37 on: September 03, 2007, 10:56:06 am »
I don't want to promote disabling the anti-hack.

How would that be promoting disabling the anti-hack? Simply fix the complication or don't have protection for that event. There is no point in having anti-hack if it limits the versatility of the game.

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Scripting Engine Suggestions
« Reply #38 on: September 06, 2007, 12:20:44 pm »
It would be extremely nice to have a working threadfunc. One that is not buggy. It would open the door to a higher scripting time resolution.
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Scripting Engine Suggestions
« Reply #39 on: September 06, 2007, 12:57:27 pm »
SetPlayerStat(ID: byte; Statement: string)

possible statements:
'Jet'
'Nades'
'Clusters'
'Vest'
'VelX' & 'VelY'
'Ammo'
'Secondary Ammo'
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host