Jump to content

Script Remove first 2 letters in string


Swe-DivX

Recommended Posts

Posted

Scriptname StringUtil Hidden

 

; return the length of the string
int Function GetLength(string s) global native

; returns a single character string with the character at index
string Function GetNthChar(string s, int index) global native

 

String LetterThree = StringUtil.GetNthChar( SomeString, 3 )

 //Edit -> I'm idiot... index start from 0 so to get C from "ABC" You need to get index 2... saying just in case xD should be 2 not 3 ;x...

 

or

; returns a substring of the specified string starting at startIndex and going for len characters
; or until the end of the string.  Default len of 0 means for the entire string
string Function Substring(string s, int startIndex, int len = 0) global native

 

image.png.9495d100d8e16d2296074463d7a36780.png

Posted
;Actor ID
int Function GetActorModID(actor akref)
	;ActorBase ActorRefBase = akref.GetLeveledActorBase()
	int ID = akref.GetFormID()
	ID = Math.LogicalAnd(ID, 0x00ffffff)
	return ID
EndFunction

 

 

trying to figure out how to flip the ID and point to an actor's formid, but it's over my head. Its for Sexlife7.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...